https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251

--- Comment #6 from Alejandro Colomar <alx at kernel dot org> ---
(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 only inside macros?

Checking whether it escapes is going to be impossible to prove in some cases,
so there will be either false positives or negatives, but restricting it to
just ({}) would make sense.  That's the only use cases that actually makes it
different from automatic variables, and which might be surprising to
programmers.

Reply via email to