This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/60021] Inconsistent -Wsign-compare warnings for -O0 and -O1
- From: "chengniansun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Feb 2014 08:52:21 +0000
- Subject: [Bug c/60021] Inconsistent -Wsign-compare warnings for -O0 and -O1
- Auto-submitted: auto-generated
- References: <bug-60021-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60021
--- Comment #1 from Chengnian Sun <chengniansun at gmail dot com> ---
Interestingly, if I remove the typedef "typedef long int64_t;", the warning is
gone.
$: cat s.c
void fn1(unsigned, char, long);
void fn1(unsigned p_26, char c, long l) { /* */
const char l_1051 = 0;
long *l_1059 = &l;
char *l_1062 = &c;
p_26 < (*l_1062 = (1L == (*l_1059 = 0)) <= l_1051);
}
$: gcc-trunk -c -O0 -Wsign-compare s.c
$: gcc-trunk -c -O1 -Wsign-compare s.c
$