Re: [PATCH 3/4] drop some obsolete "x = x" compiler warning hacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 21, 2013 at 12:10 PM, Jeff King <peff@xxxxxxxx> wrote:
> In cases where the setting and access of a variable are
> protected by the same conditional flag, older versions of
> gcc would generate a "might be used unitialized" warning. We
> silence the warning by initializing the variable to itself,
> a hack that gcc recognizes.
>
> Modern versions of gcc are smart enough to get this right,
> going back to at least version 4.3.5. gcc 4.1 does get it
> wrong in both cases, but is sufficiently old that we
> probably don't need to care about it anymore.
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
> gcc 4.2 is conspicuously missing because no current Debian system even
> has a backwards-compatibility package for it, making it harder to test.
> And 4.3 was old enough for me to say "I do not care if you can run with
> -Wall -Werror or not", let alone 4.2.

Just a data-point. This is the version we use in msysGit:

$ gcc --version
gcc.exe (TDM-1 mingw32) 4.4.0

So yeah, it's not going to increase false positives here, I guess.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]