From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10798 invoked by alias); 29 Aug 2007 08:53:11 -0000 Received: (qmail 9699 invoked by alias); 29 Aug 2007 08:52:50 -0000 Date: Wed, 29 Aug 2007 08:53:00 -0000 Message-ID: <20070829085250.9698.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/29365] Unnecessary anonymous namespace warnings In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gmail 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: 2007-08/txt/msg02134.txt.bz2 ------- Comment #39 from pinskia at gmail dot com 2007-08-29 08:52 ------- Subject: Re: Unnecessary anonymous namespace warnings On 29 Aug 2007 03:15:04 -0000, bangerth at dealii dot org wrote: > It is a good question in itself whether pimpl_ has a type at all -- it's a > pointer to an incomplete type in any case :-) All types in C++ are exported (well except for anonymous namespace types) including incomplete types. So the following two TUs are invalid when combined together. TU1: extern struct a *b; TU2: extern struct c *b; It does not matter in C++ if it is an incomplete type because the type is based on the name rather than compatibility rules (like what is done for C). So again this warning is correct based on the One definition rule. Thanks, Andrew Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365