gcc-4.6.0-0.11.fc15.x86_64 breaks strcmp?

Adam Jackson ajax at redhat.com
Mon Mar 7 15:14:57 UTC 2011


On 3/7/11 9:49 AM, Richard W.M. Jones wrote:
> Compiling libguestfs using gcc-4.6.0-0.11.fc15.x86_64 gives lots of:
>
> error: assuming signed overflow does not occur when changing X +- C1
> cmp C2 to X cmp C1 +- C2 [-Werror=strict-overflow]
>
> These seem to be associated with code that does 'if (strcmp (s1, s2)
> == 0)'
>
> For example:
>
> dir.c: In function ‘do_rm_rf’: dir.c:59:7: error: assuming signed
> overflow does not occur when changing X +- C1 cmp C2 to X cmp C1 +-
> C2 [-Werror=strict-overflow]

I'm not able to repro this with -0.12.fc15.  If I had to guess, you've 
got a macro for strcmp somewhere that's making type assumptions.  What 
does the .i file look like if you compile with -save-temps ?

- ajax


More information about the devel mailing list