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

2013-03-24 Thread Torsten Bögershausen
On 21.03.13 21:47, Jonathan Nieder wrote: Jeff King wrote: 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. Changes like this can only reveal bugs (in git or optimizers) that were hidden before, without regressing actual runtime

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

2013-03-21 Thread Jeff King
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

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

2013-03-21 Thread Erik Faye-Lund
On Thu, Mar 21, 2013 at 12:10 PM, Jeff King p...@peff.net 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

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

2013-03-21 Thread Jonathan Nieder
Jeff King wrote: 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. Changes like this can only reveal bugs (in git or optimizers) that were hidden before, without regressing actual runtime behavior, so for what it's worth I like them. I