This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Irritating warnings about implicit functions


> 
> You forgot to include example code that demonstrates the problem.

Trying to make a small, reproducible case forced me to take a different path which led to the solution.  The solution I was trying was to place the define for _GNU_SOURCE in a "master" header file which is used by all others.  I was apparently missing an include which happened earlier on and prevented definition at the point I'd placed it from taking hold.  The solution appears to be what I found in the feature_test_macros(7) man page: placing the #define _GNU_SOURCE in the *.c file *before any* includes.  This prevents the irritating warnings even when compiling with -std=c99 (as it should).

Just out of curiosity, could you explain why, even with the functions popen(), pclose() and syscall() being in the code sent to the compiler, the compiler would complain that they were implicitly defined?

Thanks,
Andy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]