public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Daniel Villeneuve <danielv@ad-opt.com> To: gcc-gnats@gcc.gnu.org Subject: c/9862: spurious warnings with -W -O3 using gcc-3.2.2 Date: Wed, 26 Feb 2003 13:56:00 -0000 [thread overview] Message-ID: <200302261346.h1QDkYe19060@neuchatel.montreal.ad-opt.com> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2157 bytes --] >Number: 9862 >Category: c >Synopsis: spurious warnings with -W -O3 using gcc-3.2.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Feb 26 13:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Daniel Villeneuve >Release: 3.2.2 >Organization: Ad Opt Technologies Inc. >Environment: System: SunOS neuchatel 5.8 Generic_108528-17 sun4u sparc SUNW,Sun-Blade-100 Architecture: sun4 host: sparc-sun-solaris2.7 build: sparc-sun-solaris2.7 target: sparc-sun-solaris2.7 configured with: ./configure --prefix=/misc/ultra-sun-solaris2/gcc-3.2.2 --enable-threads=posix --disable-shared --disable-multilib >Description: In the file <file.c> given below, the <trigger> function might return with or without a value. If compiling with -ansi -Wall -W -O3, the compiler warns about this, but also warns about the function <f> having the same problem, which is not the case. <file.c> extern int i; extern int f(void); extern int trigger(void); int f(void) { if( i ) return 0; else return 1; } int trigger(void) { if( i ) return; else return 1; } </file.c> >How-To-Repeat: gcc -ansi -Wall -W -O3 -c file.c >Fix: NOTE: This e-mail and any file attached therewith is intended only for the named recipient(s) above and contains information that is confidential and may be legally privileged and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. NOTE: Ce courriel ainsi que tout fichier d'accompagnement est destiné à l'usage exclusif du destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information confidentielle, privilegiée et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-02-26 13:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-26 13:56 Daniel Villeneuve [this message] 2003-02-26 17:31 bangerth
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=200302261346.h1QDkYe19060@neuchatel.montreal.ad-opt.com \ --to=danielv@ad-opt.com \ --cc=gcc-gnats@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).