This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C, C++] Implement -Wstatic-local


On Tue, Jul 23, 2013 at 12:48 PM, Florian Weimer <fweimer@redhat.com> wrote:
> We sometimes deal with code bases which use static local variables to cut
> down frame size, for compatibility with legacy targets.  Obviously, this is
> bad for thread safety.  This new warning can be used to track down such
> cases once you suspect they exist.

Hmm, since you mentioned bad for thread safety but then I see in your
patch you don't check to see if the variable is a thread local
variable.  Maybe you should not mention thread safety at all here or
change the code not to include TLS variables.

Thanks,
Andrew

>
> Bootstrapped and regression-tested on x86_64-redhat-linux-gnu.  Okay for
> trunk?
>
> --
> Florian Weimer / Red Hat Product Security Team
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]