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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-04 
20:35:12 UTC ---
(In reply to comment #14)
> I went through the life time issues in detail in prior comments.

Yes, but you don't seem to understand C++, as evidenced by statements like "The
operator, which has been copied into the child via inheritance,  i.e. the
child's version of the operator"

> The C++ rules
> for life time of an instance do not apply to those of the life time of a 
> class.

Classes don't have a lifetime - I don't know what you're talking about.

> Or are you saying these are not distinct?  For what reason is static type
> information known at compile time not available to operator new - which is
> called at run time?  

The static type of what?

In "A::operator new" the name "this_type" refers to A::this_type.

> Also, if operator new is to be an such an exception that static type
> information can not be accessed in it, as it can be in every other operator or
> method - then why doesn't the compiler say anything about it?  Should there 
> not
> be a warning or some sort that an artificial constraint is being applied in
> order to satisfy someone's interpretation of object lifetimes according to the
> standard?

operator new isn't an exception, all member functions work like that.

This report is invalid.  Please find somewhere else to learn C++, stackoverflow
is a good place for it, but reporting compiler bugs isn't the right way to
improve your understanding of the language.

Reply via email to