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++/49372] Temporaries evaluated for arguments of a default constructors of array elements not destructed properly (?)


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

--- Comment #5 from Johannes Schaub <schaub.johannes at googlemail dot com> 2012-12-10 16:42:59 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > Kai, I don't think anyone disputes that B's constructor is called, the question
> > is why 12.2/4 doesn't apply.
> 
> Well, we have here 5.2.2 which says "A function call is a postfix expression
> followed by parentheses containing a possibly empty, comma-separated list of
> expressions which constitute the arguments to the function."
> 
> But we don't have here an explicit function-call.  And an implicit call is not
> an expression, hence, not a part of any full expression, and so we don't have a
> sequence-point.  Not sure if specification intended it differently, but by its
> current wording I would assume that current implementation is right.
> 

See 1.9p10. The implicit function call is considered to be an expression.


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