public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wje at acm dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/14313] New: gcc i486: fail to warn of inconsistent prototype: const char * const vs. const char * Date: Fri, 27 Feb 2004 01:06:00 -0000 [thread overview] Message-ID: <20040227010626.14313.wje@acm.org> (raw) Error/warning message: none (that's the problem). === beginning of source (13 lines) int STRCMP(const char * const alpha, const char * const beta ); int STRCMP(const char * alpha, const char * beta ) { while(*alpha==*beta) { if(*alpha=='\0') return 0; alpha++; beta ++; } return (*alpha)-(*beta); } int main(void) { return (STRCMP("gamma","delta")!=0); } === end of source === beginning of simple run (15 lines) Script started on Thu Feb 26 16:45:21 2004 bill:~/cbug$ gcc --version gcc (GCC) 3.2.3 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. bill:~/cbug$ gcc -Wall cbug.c -o cbug bill:~/cbug$ echo $? 0 bill:~/cbug$ ./cbug bill:~/cbug$ echo $? 1 bill:~/cbug$ exit Script done on Thu Feb 26 16:45:42 2004 === end of simple run === beginning of gnu-recommended run (29 lines before folding) Script started on Thu Feb 26 16:50:52 2004 bill:~/cbug$ gcc -v -save-temps -Wall cbug.c -o cbug Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs Configured with: ../gcc-3.2.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux Thread model: posix gcc version 3.2.3 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/cpp0 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i486__ cbug.c -Wall cbug.i GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF) ignoring nonexistent directory "/usr/i486-slackware-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include /usr/include End of search list. /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/cc1 -fpreprocessed cbug.i -quiet -dumpbase cbug.c -Wall -version -o cbug.s GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF) GNU C version 3.2.3 (i486-slackware-linux) compiled by GNU C version 3.2.3. /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/as -V -Qy -o cbug.o cbug.s GNU assembler version 2.14.90.0.6 (i486-slackware-linux) using BFD version 2.14.90.0.6 20030820 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o cbug /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crt1.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crti.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/crtbegin.o -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3 -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/lib -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../.. cbug.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/crtend.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crtn.o bill:~/cbug$ echo $? 0 bill:~/cbug$ ./cbug bill:~/cbug$ echo $? 1 bill:~/cbug$ exit Script done on Thu Feb 26 16:52:21 2004 === end of gnu-recommended run === beginning of cbug.i (17 lines) # 1 "cbug.c" # 1 "<built-in>" # 1 "<command line>" # 1 "cbug.c" int STRCMP(const char * const alpha, const char * const beta ); int STRCMP(const char * alpha, const char * beta ) { while(*alpha==*beta) { if(*alpha=='\0') return 0; alpha++; beta ++; } return (*alpha)-(*beta); } int main(void) { return (STRCMP("gamma","delta")!=0); } === end of cbug.i -- Summary: gcc i486: fail to warn of inconsistent prototype: const char * const vs. const char * Product: gcc Version: 3.2.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wje at acm dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14313
next reply other threads:[~2004-02-27 1:06 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-02-27 1:06 wje at acm dot org [this message] 2004-02-27 2:53 ` [Bug c/14313] " pinskia at gcc dot gnu dot org 2004-02-27 8:20 ` rth at gcc dot gnu dot org 2004-02-27 14:09 ` wje at acm dot org 2004-02-27 14:19 ` jsm at polyomino dot org dot uk 2004-02-27 15:29 ` bangerth at dealii dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040227010626.14313.wje@acm.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).