This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17448] Fails to detect duplicate definition


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]