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 tree-optimization/18842] Weak optimization on global references


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-05 19:15 -------
(In reply to comment #5)
> Diagnostics? Both files are 100% valid C++ - but since the C++ standard doesn't
> enforce implementation of references as pointers they cause ABI-defined (?)
> behaviour at/after linkage, just as...

Yes both files are valid C++ but when you link them together they become invalid C++ and yes
the C++ defines this as invalid with no diagnostic required.  In fact your example is also invalid C++
but since the standard says we don't have to provide diagnostic as it is a hard problem to actually 
provide the diagnostic.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18842


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