This is the mail archive of the gcc@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]

Compiler turns off warnings unexpectedly


Hi,


I have here an (attached) testcase which unexpectedly turns off 
warnings. Compiling it using `gcc test.c -c -Wall` (or test.i) gives:

test.c: In function âpam_sm_authenticateâ:
test.c:6: warning: implicit declaration of function âundefâ

What I would have expected:

test.c: In function âpam_sm_authenticateâ:
test.c:6: warning: implicit declaration of function âundefâ
test.c: In function âpam_sm_authenticateâ:
test.c:11: warning: implicit declaration of function âundef2â

Compiler in use:

openSUSE 11.1
Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info 
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib 
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada 
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ 
--with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap 
--with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit 
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch 
--enable-version-specific-runtime-libs --program-suffix=-4.3 
--enable-linux-futex --without-system-libunwind --with-cpu=generic 
--build=i586-suse-linux
Thread model: posix
gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) 
#include <security/pam_modules.h>

int pam_sm_authenticate(pam_handle_t *pamh, int flags,
    int argc, const char **argv)
{
	undef();
}

void f2(void)
{
	undef2();
}

Attachment: test.i
Description: Text document


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