This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60517] warning/error for taking address of member of a temporary object
- From: "lopezibanez at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jul 2017 18:13:42 +0000
- Subject: [Bug c++/60517] warning/error for taking address of member of a temporary object
- Auto-submitted: auto-generated
- References: <bug-60517-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517
--- Comment #22 from Manuel López-Ibáñez <lopezibanez at gmail dot com> ---
I honestly think the uninitialized warning and fixing TREE_NOWARNING is a
red-herring. My testcase should get a warning even if .x[0] is initialized.
The problem is taking the address of a temporary. That should be detected
way before SRA happens. No control flow needed, only scope info.
On 24 Jul 2017 6:07 pm, "fredrik.hederstierna@securitas-direct.com" <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60517
>
> --- Comment #21 from Fredrik Hederstierna <fredrik.hederstierna@
> securitas-direct.com> ---
> Started with fix for PR 43347 to not warn on artificial aggregates
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43347
>
> --
> You are receiving this mail because:
> You reported the bug.