public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ktietz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49372] Temporaries evaluated for arguments of a default constructors of array elements not destructed properly (?)
Date: Mon, 10 Dec 2012 13:42:00 -0000 [thread overview]
Message-ID: <bug-49372-4-APsb6kSyo3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49372-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49372
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Last reconfirmed| |2012-12-10
Resolution|INVALID |
Ever Confirmed|0 |1
--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-12-10 13:42:30 UTC ---
(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.
But indeed 12.4 seems to be violated here. "There are two contexts in which
temporaries are destroyed at a different point than the end of the
fullexpression.
The first context is when a default constructor is called to initialize an
element of an array. If the constructor has one or more default arguments, the
destruction of every temporary created in a default argument expression is
sequenced before the construction of the next array element, if any."
So there is an antagonism in spec. I will reopen it. sorry, didn't read about
12.4
next prev parent reply other threads:[~2012-12-10 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 13:27 [Bug c++/49372] New: " schaub.johannes at googlemail dot com
2011-06-11 13:47 ` [Bug c++/49372] " schaub.johannes at googlemail dot com
2012-12-10 11:07 ` ktietz at gcc dot gnu.org
2012-12-10 13:15 ` redi at gcc dot gnu.org
2012-12-10 13:42 ` ktietz at gcc dot gnu.org [this message]
2012-12-10 16:43 ` schaub.johannes at googlemail dot com
2023-05-08 12:58 ` ppalka at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-49372-4-APsb6kSyo3@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).