This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32549] Wrong template instance resolution among multiple object files.
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2007 23:52:46 -0000
- Subject: [Bug c++/32549] Wrong template instance resolution among multiple object files.
- References: <bug-32549-14781@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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