From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7980 invoked by alias); 8 Sep 2007 23:53:02 -0000 Received: (qmail 7938 invoked by uid 48); 8 Sep 2007 23:52:46 -0000 Date: Sat, 08 Sep 2007 23:53:00 -0000 Message-ID: <20070908235246.7937.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/32549] Wrong template instance resolution among multiple object files. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at dealii dot org" 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-09/txt/msg00712.txt.bz2 ------- Comment #4 from bangerth at dealii dot org 2007-09-08 23:52 ------- The code is definitely invalid. The two typedefs declare two types with external linkage. This is an ODR violation making the code invalid. The standard doesn't require compilers to produce an error for a very good reason: it is almost impossible to detect this without support from a linker that understands all wrinkles and depths of the C++ language. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32549