[Bug c++/11880] [regression] implicit template instantiation instantiate unused class methods

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Mon Aug 11 15:24:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at codesourcery dot
                   |                            |com


------- Additional Comments From bangerth at dealii dot org  2003-08-11 15:24 -------
FWIW: icc rejects the code on the same grounds if run in strict more (-Xc -ansi). One 
of the reasons I can think of is that if an exception is raised somewhere in the 
constructor of B, then the member ptr<A> may have to be destroyed again, for which 
we need the destructor of ptr<A>. So it does somehow make sense to require that 
it can be compiled. This view is supported by the observation that the code compiles 
fine if you give -fno-exceptions. 
 
I don't know any normative statement in the standard to support my point of view, though. 
Nathan, do you? 
 
W.



More information about the Gcc-bugs mailing list