From: Jason Merrill <jason@redhat.com>
To: Qing Zhao <qing.zhao@oracle.com>, Jakub Jelinek <jakub@redhat.com>
Cc: Richard Biener <rguenther@suse.de>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: C++ vs. -ftrivial-auto-var-init= vs. vacuous initialization & jumps
Date: Sat, 6 Sep 2025 16:04:04 +0200 [thread overview]
Message-ID: <6919aab7-8b1f-4cda-a20f-ebbda729349d@redhat.com> (raw)
In-Reply-To: <107EFEB1-6D7C-4339-8D09-1C80A1994303@oracle.com>
On 9/3/25 8:40 PM, Qing Zhao wrote:
>
> I have one question (might be a stupid question):
>
> Should we consider a call to C++’s constructor as the initialization to that variable?
>
> For example:
>
> S::S (&s);
>
> Should we consider the above as an initialization to the variable s?
> then -ftrivial-auto-var-init should NOT insert the DEFFRRED_INIT to s?
The constructor might not fully initialize the variable, so I would keep
the DEFERRED_INIT.
Jason
next prev parent reply other threads:[~2025-09-06 14:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 9:19 C++ vs. -ftrivial-auto-var-init= Jakub Jelinek
2025-09-02 13:13 ` Jason Merrill
2025-09-02 21:35 ` Qing Zhao
2025-09-03 13:38 ` C++ vs. -ftrivial-auto-var-init= vs. vacuous initialization & jumps Jakub Jelinek
2025-09-03 15:23 ` Qing Zhao
2025-09-03 16:32 ` Jakub Jelinek
2025-09-03 18:40 ` Qing Zhao
2025-09-06 14:04 ` Jason Merrill [this message]
2025-09-04 12:45 ` Jakub Jelinek
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=6919aab7-8b1f-4cda-a20f-ebbda729349d@redhat.com \
--to=jason@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=qing.zhao@oracle.com \
--cc=rguenther@suse.de \
/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).