This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17448] Fails to detect duplicate definition
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2004 15:48:12 -0000
- Subject: [Bug c++/17448] Fails to detect duplicate definition
- References: <20040913005829.17448.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-09-13 15:48 -------
No, no diagnostics are required at all. Think of non-inline functions that
the compiler chooses to inline anyway. Or of cases where the compiler
for whatever reason can assume that a function isn't referenced from
anywhere else (though there is a second _definition_ floating around
somewhere) and decides to give a function internal linkage even though
that wasn't specified explicitly by the user.
In general, the linking phase is not covered in any detail by the standard
at all.
So let's keep this open to see whether someone has some input about diagnosing
this particular case. As mentioned, I'm not even sure whether we have an ODR
violation in your testcase. Kriang, you as our resident template friend
expert, could you shed some light on the question I raised in comment #7?
W.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |lerdsuwa at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17448