This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Infinite loop in dcraw with current GCC versions
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: dcoffin at shell dot cybercom dot net
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, Conchúr Navid <conchur at web dot de>, Sven Eckelmann <sven at narfation dot org>, René Rebe ExactCODE <rene at exactcode dot com>
- Date: Tue, 3 Mar 2015 13:34:46 +0100
- Subject: Re: Infinite loop in dcraw with current GCC versions
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQDZs=EZTAj7bO5Dn8d=M8p8MuN7_s__XNatnL2BWgs9wA at mail dot gmail dot com> <CAESRpQBx7V=O-pH5Ckvt=XpJHYyEwCyZGz1HQTByqdKftQC0MQ at mail dot gmail dot com> <20150227190206 dot GA6175 at shell dot cybercom dot net> <CAESRpQCCWVQGeWMByFFiX6MLoA-VxJ3AAp5u99VdOy7h8SsgQg at mail dot gmail dot com> <20150227204552 dot GA8916 at shell dot cybercom dot net> <CAESRpQAbO-6Zy3FBvR56NDiAGJg8CZYtSTUPLR5jud0baNHKHg at mail dot gmail dot com> <20150301200320 dot GA10973 at shell dot cybercom dot net> <CAESRpQCVoDDiySQ4jJ8XWXi9crYRVCA94b2WJzcTBZgs23WF=w at mail dot gmail dot com> <20150303023211 dot GA23376 at shell dot cybercom dot net>
On 3 March 2015 at 03:32, <dcoffin@shell.cybercom.net> wrote:
> Hi Manuel,
>
> Here's the blend_highlights() function from dcraw.c
> with just the includes, defines, and globals it needs to
> compile.
>
> gcc -Wall -O4 -march=athlon64 foo.c
>
> gives two "array bounds" warnings,
>
> gcc -Wall -O4 -march=x86-64 foo.c
> gcc -Wall -O4 foo.c
> gcc -Wall -O3 foo.c
>
> give one warning, while "-O2" or less gives no warnings.
> Unlike -Wunused-result and -Waggressive-loop-optimizations,
> -Warray-bound is not enabled by default, only because I use
> -Wall.
Sorry, I cannot reproduce the warning with either gcc 4.8.2 or gcc 5.0
(r221118). In any case, it would be better to open a PR
(https://gcc.gnu.org/bugs/) than to discuss it here. BTW, -Ox n >=3 is
exactly equivalent to -O3.
Cheers,
Manuel.