From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13307 invoked by alias); 15 Dec 2006 16:28:29 -0000 Received: (qmail 13269 invoked by alias); 15 Dec 2006 16:28:16 -0000 Date: Fri, 15 Dec 2006 16:28:00 -0000 Message-ID: <20061215162816.13268.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/30219] Inconsistent reporting of duplicate typedef In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ross dot alexander at uk dot neceur dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-12/txt/msg01372.txt.bz2 ------- 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