This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49372] Temporaries evaluated for arguments of a default constructors of array elements not destructed properly (?)
- From: "schaub.johannes at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Dec 2012 16:42:59 +0000
- Subject: [Bug c++/49372] Temporaries evaluated for arguments of a default constructors of array elements not destructed properly (?)
- Auto-submitted: auto-generated
- References: <bug-49372-4@http.gcc.gnu.org/bugzilla/>
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.