Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3663618
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:33:03+00:00 2026-05-19T01:33:03+00:00

As the title says, I know what causes this error but I want to

  • 0

As the title says, I know what causes this error but I want to know why the compiler gives it in this circumstance.

Eg :

main.c

void test(){
    test1();
}

void test1(){
   ...
}

Would give an implicit declaration warning as the compiler would reach the call to test1() before it has read its declaration, I can see the obvious problems with this (not knowing return type etc), but why can’t the compiler do a simple pass to get all function declarations, then compile the code removing these errors? It just seems so simple to do and I don’t believe I’ve seen similar warnings in other languages.

Does anyone know if there is a specific purpose for this warning in this situation that I am overlooking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:33:03+00:00Added an answer on May 19, 2026 at 1:33 am

    Short answer: Because C is ooooold. 🙂

    Long answer: The C compiler and linker are totally separate. You might be defining different functions across different source files, and then linking them together. In this case, say that you were defining test1 in a separate library source file. The compiler wouldn’t know about test1 until it has compiled the other file, and it compiles the other file separately so it can’t know about it when it’s compiling test. Therefore you have to tell it, ‘yes, there really is a test1 defined elsewhere, and here is its signature’. That’s why you usually include a header file (.h), for any other source files whose functions you need to use, in this one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What the title says. I want to know if there something in the JDK
Though the title says everything, I want to let you know the particular scenario
As the title says, I want to know if it is be possible to
as the title says, I want to know in c++, whether the memory allocated
Like the title says, I want to know what (int (*)()) in a C-define-function-call
Just as title says. I don't believe it is possible to do this but
As the title says, I want to know the exact reason why JavaScript is
As title says, this issue happens in MS Access 2003 SP1. Does anyone know
As the title says, I want to know, if possible, how can I create
The title says all I want to know. Is there any function or I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.