public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no");
@ 2008-04-10 18:44 rsa at us dot ibm dot com
2008-04-10 18:58 ` [Bug c/35903] " rsa at us dot ibm dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: rsa at us dot ibm dot com @ 2008-04-10 18:44 UTC (permalink / raw)
To: gcc-bugs
When building libm-test.c (part of the GLIBC make check math test suite for
GLIBC CVS head as of April 10, 2008) with GCC 4.3 I get the following warning:
math/libm-test.c: In function 'parse_opt':
math/libm-test.c:6102: warning: array subscript is above array bounds
In relation to the following code:
if (strcmp (arg, "yes") == 0)
This warning goes away if replaced with:
char yes[] = "yes";
if (strcmp (arg,yes) == 0)
Andrew Pinski says this is a false warning and that I should file a bug report.
--
Summary: false warning when passing quoted string to function
strcmp(arg,"no");
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rsa at us dot ibm dot com
GCC build triplet: n/a
GCC host triplet: n/a
GCC target triplet: n/a
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
@ 2008-04-10 18:58 ` rsa at us dot ibm dot com
2008-04-10 18:59 ` rsa at us dot ibm dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rsa at us dot ibm dot com @ 2008-04-10 18:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rsa at us dot ibm dot com 2008-04-10 18:57 -------
Created an attachment (id=15465)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15465&action=view)
preprocessed test-ildouble.c file.
strcmp on line 16036 seems to be the problematic one.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
2008-04-10 18:58 ` [Bug c/35903] " rsa at us dot ibm dot com
@ 2008-04-10 18:59 ` rsa at us dot ibm dot com
2009-10-16 16:51 ` [Bug middle-end/35903] " cepeda at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rsa at us dot ibm dot com @ 2008-04-10 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rsa at us dot ibm dot com 2008-04-10 18:58 -------
Compiled with:
cd /home/ryanarn/glibc/stages/stage_lround/glibc/math
/opt/at43/bin/gcc -m32 test-ildoubl.c -save-temps -c -std=gnu99 -fgnu89-inline
-O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -mcpu=power4
-mlong-double-128 -mnew-mnemonics -Wstrict-prototypes -mlong-double-128
-Wno-uninitialized -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES
-I../include
-I/home/ryanarn/glibc/stages/stage_lround/build/glibc32_power4/math
-I/home/ryanarn/glibc/stages/stage_lround/build/glibc32_power4
-I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu
-I../sysdeps/powerpc/powerpc32/power4/fpu
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32/power4
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu
-I../sysdeps/powerpc/powerpc32/fpu
-I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32
-I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc
-I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc
-I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/powerpc/powerpc32/power4 -I../sysdeps/powerpc/powerpc32
-I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../sysdeps/powerpc/math
-I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf
-I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem
/opt/at43/lib/gcc/powerpc64-linux/4.3.0/include -isystem
/opt/at43/lib/gcc/powerpc64-linux/4.3.0/include-fixed -isystem /usr/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h -DNOT_IN_libc=1
-U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ -DTEST_FAST_MATH -fno-builtin
-o
/home/ryanarn/glibc/stages/stage_lround/build/glibc32_power4/math/test-ildoubl.o
-MD -MP -MF
/home/ryanarn/glibc/stages/stage_lround/build/glibc32_power4/math/test-ildoubl.o.dt
-MT
/home/ryanarn/glibc/stages/stage_lround/build/glibc32_power4/math/test-ildoubl.o
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
2008-04-10 18:58 ` [Bug c/35903] " rsa at us dot ibm dot com
2008-04-10 18:59 ` rsa at us dot ibm dot com
@ 2009-10-16 16:51 ` cepeda at gmail dot com
2009-10-17 11:03 ` manu at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cepeda at gmail dot com @ 2009-10-16 16:51 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4462 bytes --]
------- Comment #3 from cepeda at gmail dot com 2009-10-16 16:51 -------
This bug has no changed for months, I think it is still active.
It seems not to work only when size of char[] is 3 (2+'\0'). A test case is
this:
// Begin of code
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
printf("%d",strcmp(argv[0],"A")); // NO warning
printf("%d",strcmp(argv[0],"AA")); // warning: array subscript
printf("%d",strcmp(argv[0],"AAA")); // NO warning
return 0;
}
// End of code
The compilation says:
$ gcc -v -save-temps -O3 -fno-builtin -funsigned-char -Wall test.c
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-fno-builtin' '-funsigned-char'
'-Wall' '-mtune=generic' '-march=i486'
/usr/lib/gcc/i486-linux-gnu/4.4.1/cc1 -E -quiet -v test.c -D_FORTIFY_SOURCE=2
-mtune=generic -march=i486 -Wall -fno-builtin -funsigned-char -O3
-fpch-preprocess -fstack-protector -o test.i
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i486-linux-gnu/4.4.1/include
/usr/lib/gcc/i486-linux-gnu/4.4.1/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-fno-builtin' '-funsigned-char'
'-Wall' '-mtune=generic' '-march=i486'
/usr/lib/gcc/i486-linux-gnu/4.4.1/cc1 -fpreprocessed test.i -quiet -dumpbase
test.c -mtune=generic -march=i486 -auxbase test -O3 -Wall -version -fno-builtin
-funsigned-char -fstack-protector -o test.s
GNU C (Ubuntu 4.4.1-4ubuntu8) version 4.4.1 (i486-linux-gnu)
compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version
2.4.1-p2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 293503c4ddf766b61fc5ff6a5ff38cdc
test.c: In function main:
test.c:7: warning: array subscript is above array bounds
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-fno-builtin' '-funsigned-char'
'-Wall' '-mtune=generic' '-march=i486'
as -V -Qy -o test.o test.s
GNU assembler version 2.19.92 (i486-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.19.92.20091014
COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../:/lib/:/usr/lib/:/usr/lib/i486-linux-gnu/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-fno-builtin' '-funsigned-char'
'-Wall' '-mtune=generic' '-march=i486'
/usr/lib/gcc/i486-linux-gnu/4.4.1/collect2 --build-id --eh-frame-hdr -m
elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 -z relro
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o
/usr/lib/gcc/i486-linux-gnu/4.4.1/crtbegin.o
-L/usr/lib/gcc/i486-linux-gnu/4.4.1 -L/usr/lib/gcc/i486-linux-gnu/4.4.1
-L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../..
-L/usr/lib/i486-linux-gnu test.o -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/i486-linux-gnu/4.4.1/crtend.o
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crtn.o
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (2 preceding siblings ...)
2009-10-16 16:51 ` [Bug middle-end/35903] " cepeda at gmail dot com
@ 2009-10-17 11:03 ` manu at gcc dot gnu dot org
2009-10-22 17:56 ` manu at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-10-17 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2009-10-17 11:03 -------
(In reply to comment #3)
> This bug has no changed for months, I think it is still active.
Newer higher priority bugs often make us forget about old inactive bugs. Going
through old bugs and testing whether they still exist in a recent GCC would be
extremely helpful.
> It seems not to work only when size of char[] is 3 (2+'\0'). A test case is
> this:
Could you produce a preprocessed testcase? Is the printf needed? If not, please
take it and stdio.h out of the testcase to make it even simpler.
http://gcc.gnu.org/bugs/#need
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (3 preceding siblings ...)
2009-10-17 11:03 ` manu at gcc dot gnu dot org
@ 2009-10-22 17:56 ` manu at gcc dot gnu dot org
2009-10-22 18:30 ` cepeda at gmail dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-10-22 17:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2009-10-22 17:56 -------
@Alfonso,
We need the preprocessed testcase. See my previous comment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (4 preceding siblings ...)
2009-10-22 17:56 ` manu at gcc dot gnu dot org
@ 2009-10-22 18:30 ` cepeda at gmail dot com
2009-10-22 18:32 ` cepeda at gmail dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cepeda at gmail dot com @ 2009-10-22 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from cepeda at gmail dot com 2009-10-22 18:30 -------
Created an attachment (id=18870)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18870&action=view)
Preprocessed file of the testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (5 preceding siblings ...)
2009-10-22 18:30 ` cepeda at gmail dot com
@ 2009-10-22 18:32 ` cepeda at gmail dot com
2010-01-02 19:24 ` [Bug middle-end/35903] false uninitialized " rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cepeda at gmail dot com @ 2009-10-22 18:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from cepeda at gmail dot com 2009-10-22 18:31 -------
Unfortunately and surprisely, printf is needed in this testcase. I think that a
different testcase without the printf can be found because the bigger code that
I used had not got the printf.
I have attatched the preproccessed testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false uninitialized warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (6 preceding siblings ...)
2009-10-22 18:32 ` cepeda at gmail dot com
@ 2010-01-02 19:24 ` rguenth at gcc dot gnu dot org
2010-02-19 23:56 ` [Bug middle-end/35903] false Warray-bounds " manu at gcc dot gnu dot org
2010-02-20 0:19 ` manu at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-02 19:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-01-02 19:24 -------
Similar to PR35392 this only happens with -funsigned-char, thus these may
as well be dups.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |35392
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-02 19:24:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false Warray-bounds warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (7 preceding siblings ...)
2010-01-02 19:24 ` [Bug middle-end/35903] false uninitialized " rguenth at gcc dot gnu dot org
@ 2010-02-19 23:56 ` manu at gcc dot gnu dot org
2010-02-20 0:19 ` manu at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-19 23:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from manu at gcc dot gnu dot org 2010-02-19 23:56 -------
This is not an uninitialized issue.
The reason this requires -O2 is that -Warray-bounds requires VRP to warn. The
gimple output already looks quite different.
-funsigned-char:
<D.1565>:
[pr35903.i : 309:15] D.1567 = __s1D.796 + 3;
[pr35903.i : 309:15] D.1568 = [pr35903.i : 309] *D.1567;
[pr35903.i : 310:11] D.1569 = (intD.0) D.1568;
[pr35903.i : 318:12] D.1570 = [pr35903.i : 311] &[pr35903.i : 311]
"AA"[0] + 3;
[pr35903.i : 318:12] D.1571 = [pr35903.i : 318] *D.1570;
[pr35903.i : 310:11] D.1572 = (intD.0) D.1571;
[pr35903.i : 308:10] __resultD.797 = D.1569 - D.1572;
<D.1566>:
<D.1556>:
-fsigned-char
<D.1566>:
[pr35903.i : 309:15] D.1568 = __s1D.796 + 3;
[pr35903.i : 309:15] D.1569 = [pr35903.i : 309] *D.1568;
[pr35903.i : 310:11] D.1570 = (intD.0) D.1569;
[pr35903.i : 311:12] D.1540 = (const unsigned charD.10 *) [pr35903.i :
318] "AA";
[pr35903.i : 318:12] D.1571 = D.1540 + 3;
[pr35903.i : 318:12] D.1572 = [pr35903.i : 318] *D.1571;
[pr35903.i : 310:11] D.1573 = (intD.0) D.1572;
[pr35903.i : 308:10] __resultD.797 = D.1570 - D.1573;
<D.1567>:
<D.1557>:
<D.1547>:
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|24639 |
nThis| |
Summary|false uninitialized warning |false Warray-bounds warning
|when passing quoted string |when passing quoted string
|to function |to function
|strcmp(arg,"no"); |strcmp(arg,"no");
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/35903] false Warray-bounds warning when passing quoted string to function strcmp(arg,"no");
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
` (8 preceding siblings ...)
2010-02-19 23:56 ` [Bug middle-end/35903] false Warray-bounds " manu at gcc dot gnu dot org
@ 2010-02-20 0:19 ` manu at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-02-20 0:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from manu at gcc dot gnu dot org 2010-02-20 00:19 -------
Reduced testcase:
extern int strlen (__const char *__s);
int echo (int);
int main(int argc, char **argv)
{
echo (({ int __s1_len, __s2_len;
(__builtin_constant_p (argv[0]) && __builtin_constant_p ("AA") &&
(__s1_len = strlen (argv[0]), __s2_len = strlen ("AA"),
(!((int)(const void *)((argv[0]) + 1) - (int)(const void *)(argv[0]) == 1)
|| __s1_len >= 4)
&&
(!((int)(const void *)(("AA") + 1) - (int)(const void *)("AA") == 1)
|| __s2_len >= 4))
? 1
: (__builtin_constant_p (argv[0])
&& ((int)(const void *)((argv[0]) + 1) - (int)(const void *)(argv[0]) ==
1)
&& (__s1_len = strlen (argv[0]), __s1_len < 4)
? 1
: (__builtin_constant_p ("AA") && ((int)(const void *)(("AA") + 1) -
(int)(const void *)("AA") == 1)
&& (__s2_len = strlen ("AA"), __s2_len < 4)
? (__builtin_constant_p (argv[0])
&& ((int)(const void *)((argv[0]) + 1) - (int)(const void
*)(argv[0]) == 1)
? 1
: (({
__const unsigned char *__s1 = (__const unsigned char *) (__const
char *) (argv[0]);
register int __result = __s1[0] - ((__const unsigned char *)
(__const char *) ("AA"))[0];
if (__s2_len > 0 && __result == 0)
{
__result = (__s1[1] - ((__const unsigned char *) (__const
char *) ("AA"))[1]);
if (__s2_len > 1 && __result == 0)
{
__result = (__s1[2] - ((__const unsigned char *) (__const
char *) ("AA"))[2]);
if (__s2_len > 2 && __result == 0)
__result = (__s1[3] - ((__const unsigned char *)
(__const char *) ("AA"))[3]);
}
}
__result;
})))
: 0))); }));
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35903
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-02-20 0:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-10 18:44 [Bug c/35903] New: false warning when passing quoted string to function strcmp(arg,"no"); rsa at us dot ibm dot com
2008-04-10 18:58 ` [Bug c/35903] " rsa at us dot ibm dot com
2008-04-10 18:59 ` rsa at us dot ibm dot com
2009-10-16 16:51 ` [Bug middle-end/35903] " cepeda at gmail dot com
2009-10-17 11:03 ` manu at gcc dot gnu dot org
2009-10-22 17:56 ` manu at gcc dot gnu dot org
2009-10-22 18:30 ` cepeda at gmail dot com
2009-10-22 18:32 ` cepeda at gmail dot com
2010-01-02 19:24 ` [Bug middle-end/35903] false uninitialized " rguenth at gcc dot gnu dot org
2010-02-19 23:56 ` [Bug middle-end/35903] false Warray-bounds " manu at gcc dot gnu dot org
2010-02-20 0:19 ` manu at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).