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++/11880] [regression] implicit template instantiation instantiate unused class methods


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.


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