From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17129 invoked by alias); 27 Feb 2013 09:34:28 -0000 Received: (qmail 15792 invoked by uid 48); 27 Feb 2013 09:33:29 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/56468] Clang exposes bug with unexpected forward-declaration of type_info Date: Wed, 27 Feb 2013 09:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-02/txt/msg02568.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56468 --- Comment #3 from Jonathan Wakely 2013-02-27 09:33:27 UTC --- It's because of the implicit declaration of std::type_info, G++ correctly diagnoses similar cases with altered namespace names or type names, it only happens for std::type_info. I see no harm in adding an explicit declaration to the libstdc++ header so it works with clang and other compilers that don't declare std::type_info automatically.