Re: gcc-4.6.0-0.12.fc15.x86_64 breaks strcmp?

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

 



On Mon, Mar 07, 2011 at 05:15:18PM +0100, Jim Meyering wrote:
> With the former and -O3, I do see your warning.
> Here's a pared-down test case:
> 
>     $ cat k.c
>     #include <string.h>
>     void do_rm_rf (const char *p) { if (strcmp (p, "/") == 0) return; }
>     $ gcc -Wall -O3 -c k.c -Werror=strict-overflow
>     k.c: In function âdo_rm_rfâ:
>     k.c:2:1678: error: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C1 +- C2 [-Werror=strict-overflow]
>     cc1: some warnings being treated as errors

FYI, as a workaround -D__NO_STRING_INLINES should work, then strcmp
isn't expanded to the fancy glibc expansion...

	Jakub
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux