------- Comment #5 from ross dot alexander at uk dot neceur dot com 2006-12-15 16:28 ------- Subject: Re: Inconsistent reporting of duplicate typedef
> This is inconsistent on purpose. > Try using -Wsystem-headers if you want an error on system headers. I can't get it to error if it is using -Wsystem-headers. Reading the documentation I understand the purpose of flag but this seems to be ignoring an error rather than not reporting a warning. I have /usr/include/GL -> /usr/X11R6/include/GL so I can see why I get a failure with -I/usr/X11R6/include but it should still be erring with -I/usr/include (since glext.h does have an error in it). mig27 15:47:08$ gcc -c -Wsystem-headers -I/usr/include test.c mig27 15:47:12$ gcc -c -Wsystem-headers -I/usr/X11R6/include test.c In file included from /usr/X11R6/include/GL/gl.h:1630, from test.c:1: /usr/X11R6/include/GL/glext.h:6952: error: redefinition of typedef âPFNGLGETUNIFORMUIVEXTPROCâ /usr/X11R6/include/GL/glext.h:6941: error: previous declaration of âPFNGLGETUNIFORMUIVEXTPROCâ was here mig27 15:47:19$ gcc -c -Wsystem-headers -I/usr/include test.c mig27 15:49:20$ gcc -c -Wsystem-headers -Werror -I/usr/include test.c mig27 15:56:23$ gcc -c -I/usr/include test.c mig27 15:56:26$ gcc -c -I/usr/X11R6/include test.c In file included from /usr/X11R6/include/GL/gl.h:1630, from test.c:1: /usr/X11R6/include/GL/glext.h:6952: error: redefinition of typedef âPFNGLGETUNIFORMUIVEXTPROCâ /usr/X11R6/include/GL/glext.h:6941: error: previous declaration of âPFNGLGETUNIFORMUIVEXTPROCâ was here > Also this is the main reason why we only error with -Wsystem-headers with system headers. > PS please don't send private header files next time. Okay. Cheers, Ross ------- Comment #6 from ross dot alexander at uk dot neceur dot com 2006-12-15 16:28 ------- Created an attachment (id=12814) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12814&action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30219