Irritating warnings about implicit functions

Andy Falanga (afalanga)
Tue Aug 27 01:20:00 GMT 2013

> 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?


More information about the Gcc-help mailing list