public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7981: -Wsequence-point broken for C++
@ 2003-03-21 5:43 neroden
0 siblings, 0 replies; 4+ messages in thread
From: neroden @ 2003-03-21 5:43 UTC (permalink / raw)
To: austern, gcc-bugs, gcc-prs, nobody
Synopsis: -Wsequence-point broken for C++
State-Changed-From-To: feedback->closed
State-Changed-By: neroden
State-Changed-When: Fri Mar 21 05:43:48 2003
State-Changed-Why:
Seems fixed, no feedback 3 mo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7981
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/7981: -Wsequence-point broken for C++
@ 2002-12-19 17:31 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2002-12-19 17:31 UTC (permalink / raw)
To: austern, gcc-bugs, gcc-prs, nobody
Synopsis: -Wsequence-point broken for C++
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Thu Dec 19 17:31:51 2002
State-Changed-Why:
In the documentation on TOT, the standard is always referenced
as the "C standard", and there is now a sentence
"The present implementation of this option only works for C programs. A
future implementation may also work for C++ programs."
Is this something in the direction you request, Matt?
W.
PS: I like the sentence that follows the above:
"The C standard is worded confusingly, therefore there is some debate
over the precise meaning of the sequence point rules in subtle cases."
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7981
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/7981: -Wsequence-point broken for C++
@ 2002-09-19 16:26 Joseph S. Myers
0 siblings, 0 replies; 4+ messages in thread
From: Joseph S. Myers @ 2002-09-19 16:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/7981; it has been noted by GNATS.
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: <austern@apple.com>
Cc: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>
Subject: Re: c++/7981: -Wsequence-point broken for C++
Date: Fri, 20 Sep 2002 00:22:39 +0100 (BST)
On 19 Sep 2002 austern@apple.com wrote:
> The documentation doesn't list -Wsequence-point as a C-only option.
The manual says:
The present implementation of this option only works for C programs. A
future implementation may also work for C++ programs.
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 4+ messages in thread
* c++/7981: -Wsequence-point broken for C++
@ 2002-09-19 16:16 austern
0 siblings, 0 replies; 4+ messages in thread
From: austern @ 2002-09-19 16:16 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-21 5:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 5:43 c++/7981: -Wsequence-point broken for C++ neroden
-- strict thread matches above, loose matches on Subject: below --
2002-12-19 17:31 bangerth
2002-09-19 16:26 Joseph S. Myers
2002-09-19 16:16 austern
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).