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]

Why "'X' used but never defined" is a warning and not error in gcc?


test.c:
    static void foo();
    
    void bar() {
        foo();
    }

$ gcc -c test.c
test.c:1: warning: 'foo' used but never defined

Why warning and not error? Another *.o can refer this static function?


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