https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #10 from Alejandro Colomar ---
(In reply to Jakub Jelinek from comment #8)
> In that case the warning should be also restricted to the case when ({ comes
> from macro expansion and the compound literal from macro argument (not sure
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #9 from Jakub Jelinek ---
(In reply to Andrew Pinski from comment #7)
> GCC already has Wdangling-pointer which is done at optimization time too so
> I suspect it should catch most of these. Though it should be improved for
> handlin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #8 from Jakub Jelinek ---
In that case the warning should be also restricted to the case when ({ comes
from macro expansion and the compound literal from macro argument (not sure if
the last one can be differentiated from locations).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
Andrew Pinski changed:
What|Removed |Added
Blocks||104077
--- Comment #7 from Andrew Pinsk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #6 from Alejandro Colomar ---
(In reply to uecker from comment #5)
> Maybe a more targeted warning would make sense, e.g. taking the address of a
> compound literal inside ({ }). Maybe even checking whether it escapes?
> And/or onl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
Richard Biener changed:
What|Removed |Added
Severity|normal |enhancement
Version|unknown
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #5 from uecker at gcc dot gnu.org ---
Maybe a more targeted warning would make sense, e.g. taking the address of a
compound literal inside ({ }). Maybe even checking whether it escapes? And/or
only inside macros?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #3 from Alejandro Colomar ---
(In reply to Jakub Jelinek from comment #1)
> How is compound literal different from any other automatic variable?
> And of course taking the address of compound literal when used in scope is
> just fine
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
uecker at gcc dot gnu.org changed:
What|Removed |Added
CC||uecker at gcc dot gnu.org
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
--- Comment #4 from Alejandro Colomar ---
I understand that program rely on this. I don't intend this diagnostic to be
in -Wextra (at least not for now). I just want to have it available, so that I
can enable it for myself.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1
11 matches
Mail list logo