From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25246 invoked by alias); 15 Dec 2006 16:57:04 -0000 Received: (qmail 25207 invoked by uid 48); 15 Dec 2006 16:56:52 -0000 Date: Fri, 15 Dec 2006 16:57:00 -0000 Message-ID: <20061215165652.25206.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/msg01374.txt.bz2 ------- Comment #7 from ross dot alexander at uk dot neceur dot com 2006-12-15 16:56 ------- I have found the relevent code in c-decl.c but it would be nice if this emitted a warning so that if -Wsystem-headers is set then the warning will show up. Thanks for the assistence. Ross /* Redeclaration of a type is a constraint violation (6.7.2.3p1), but silently ignore the redeclaration if either is in a system header. (Conflicting redeclarations were handled above.) */ if (TREE_CODE (newdecl) == TYPE_DECL) { if (DECL_IN_SYSTEM_HEADER (newdecl) || DECL_IN_SYSTEM_HEADER (olddecl)) return true; /* Allow OLDDECL to continue in use. */ error ("redefinition of typedef %q+D", newdecl); locate_old_decl (olddecl, error); return false; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30219