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++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...


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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-08 14:42:58 UTC ---
It's not a bug though, since you're expecting behaviour which is not guaranteed
and never has been guaranteed.

Why does it matter?  If you have another file where you suppress implicit
instantiation (either by 'extern template' or -fno-implicit-templates) then you
are required to provide an explicit instantiation somewhere in the program.
Assuming an implicit instantiation will happen is an incorrect.


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