This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18842] Weak optimization on global references
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2004 19:15:10 -0000
- Subject: [Bug tree-optimization/18842] Weak optimization on global references
- References: <20041205085537.18842.felix.nawothnig@t-online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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