public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: austern@apple.com To: gcc-gnats@gcc.gnu.org Subject: c++/7981: -Wsequence-point broken for C++ Date: Thu, 19 Sep 2002 16:16:00 -0000 [thread overview] Message-ID: <20020919231312.32344.qmail@sources.redhat.com> (raw) >Number: 7981 >Category: c++ >Synopsis: -Wsequence-point broken for C++ >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Sep 19 16:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: austern@apple.com >Release: 3.1, 3.2, and TOT >Organization: >Environment: Linux, OS X >Description: The documentation doesn't list -Wsequence-point as a C-only option. However, it turns out that this warning doesn't work for C++. In 3.1 and 3.2 the option fails silently; in TOT we get a warning saying (in contradiction to the documentation) that this option isn't available for C++. Either the compiler or the documentation should be fixed. >How-To-Repeat: bash-2.05$ cat > foo.c int main() { int a = 0; a = a++; return a; } bash-2.05$ /usr/local/gcc-3.1/bin/gcc -Wsequence-point foo.c foo.c: In function `main': foo.c:3: warning: operation on `a' may be undefined bash-2.05$ /usr/local/gcc-3.1/bin/g++ -Wsequence-point foo.c bash-2.05$ /usr/local/gcc-3.2/bin/g++ -Wsequence-point foo.c bash-2.05$ ~/root/bin/g++ -Wsequence-point foo.c cc1plus: warning: "-Wsequence-point" is valid for C/ObjC but not for C++ bash-2.05$ >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-09-19 23:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-19 16:16 austern [this message] 2002-09-19 16:26 Joseph S. Myers 2002-12-19 17:31 bangerth 2003-03-21 5:43 neroden
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=20020919231312.32344.qmail@sources.redhat.com \ --to=austern@apple.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).