Expand|Select|Wrap|Line Numbers
- gcc mycode.c
But since my assignment has a specific restriction, my code must go through this:
Expand|Select|Wrap|Line Numbers
- gcc -pedantic-errors Wmissing-declarations -Wall -Werror -ansi mycode.c
gcc:Wmissing-declarations:No such file or directory.
I downloaded the pdf manual from gcc.gnu.org and found this description:
-Wmissing-declarations (C only)
Warn if a global function is defined without a previous declaration. Do so even
if the definition itself provides a prototype. Use this option to detect global
functions that are not declared in header files.
I've deleted all functions, even the prototypes, and left nothing in the body of main function, but I still got the same warning message.
Okay, I give up trying to figure out why...Why?
Expand|Select|Wrap|Line Numbers
- #include <stdio.h>
- int main(int argc, char *argv[])
- {
- printf("Blah Blah Blah!\n");
- return 0;
- }
Expand|Select|Wrap|Line Numbers
- gcc -pedantic-errors Wmissing-declarations -Wall -Werror -ansi why.c
gcc:Wmissing-declarations:No such file or directory.
Thanks in advance.