public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3385: -std=foo doesn't work with C++
@ 2001-06-23 2:16 Joseph S. Myers
0 siblings, 0 replies; 6+ messages in thread
From: Joseph S. Myers @ 2001-06-23 2:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3385; it has been noted by GNATS.
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: Daniel Elstner <daniel.elstner@gmx.net>, <gcc-gnats@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>
Subject: Re: c++/3385: -std=foo doesn't work with C++
Date: Sat, 23 Jun 2001 10:11:33 +0100 (BST)
On Sat, 23 Jun 2001, Neil Booth wrote:
> cpplib supports "-std=c++98", so we should stick with that. I don't
> see the value in the really verbose forms.
For someone familiar with the C++ standard but not C++ culture/history,
the iso14882:1998 form would be natural. (Though if going literally by
what appears on every page of the standard, it should be -std='ISO/IEC
14882:1998(E)'.)
Presumably your specs reorganisation can make all the -std options, and
-ansi, alias down to the few values cc1/cc1plus/cpplib need to know about,
including having -ansi become -std=c89 when compiling C and -std=c++98
when compiling C++ (possibly both on the same driver command line)?
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c++/3385: -std=foo doesn't work with C++
@ 2002-04-26 4:04 nathan
0 siblings, 0 replies; 6+ messages in thread
From: nathan @ 2002-04-26 4:04 UTC (permalink / raw)
To: daniel.elstner, gcc-bugs, gcc-prs, nobody
Synopsis: -std=foo doesn't work with C++
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Apr 26 04:04:29 2002
State-Changed-Why:
seem to have reached consus that it is ok as is
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3385
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c++/3385: -std=foo doesn't work with C++
@ 2001-06-23 7:06 Gabriel Dos Reis
0 siblings, 0 replies; 6+ messages in thread
From: Gabriel Dos Reis @ 2001-06-23 7:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3385; it has been noted by GNATS.
From: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
To: "Joseph S. Myers" <jsm28@cam.ac.uk>
Cc: Neil Booth <neil@daikokuya.demon.co.uk>,
Daniel Elstner <daniel.elstner@gmx.net>, <gcc-gnats@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>
Subject: Re: c++/3385: -std=foo doesn't work with C++
Date: 23 Jun 2001 16:04:22 +0200
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
| On Sat, 23 Jun 2001, Neil Booth wrote:
|
| > cpplib supports "-std=c++98", so we should stick with that. I don't
| > see the value in the really verbose forms.
|
| For someone familiar with the C++ standard but not C++ culture/history,
| the iso14882:1998 form would be natural. (Though if going literally by
| what appears on every page of the standard, it should be -std='ISO/IEC
| 14882:1998(E)'.)
I think we should just draw the line somewhere and 'c++98' is
fine. After all, the compiler recognizes switches it does recognize,
and if the doc says 'c++98' is what turn on 'ISO/IEC 14882:1998' then
that it is.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c++/3385: -std=foo doesn't work with C++
@ 2001-06-23 1:36 Neil Booth
0 siblings, 0 replies; 6+ messages in thread
From: Neil Booth @ 2001-06-23 1:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3385; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: "Joseph S. Myers" <jsm28@cam.ac.uk>
Cc: Daniel Elstner <daniel.elstner@gmx.net>, gcc-gnats@gcc.gnu.org,
gcc-bugs@gcc.gnu.org
Subject: Re: c++/3385: -std=foo doesn't work with C++
Date: Sat, 23 Jun 2001 09:29:23 +0100
Joseph S. Myers wrote:-
> It would make sense to support -std for C++, with possible values being
> iso14882:1998 and g++98, but it's never going to make sense to specify a C
> standard (ISO 9899) version when compiling C++, and there ought to be
> appropriate errors given if you try to do so; the lack of error messages
> is a bug.
cpplib supports "-std=c++98", so we should stick with that. I don't
see the value in the really verbose forms.
Neil.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c++/3385: -std=foo doesn't work with C++
@ 2001-06-22 17:46 Joseph S. Myers
0 siblings, 0 replies; 6+ messages in thread
From: Joseph S. Myers @ 2001-06-22 17:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3385; it has been noted by GNATS.
From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Daniel Elstner <daniel.elstner@gmx.net>
Cc: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>
Subject: Re: c++/3385: -std=foo doesn't work with C++
Date: Sat, 23 Jun 2001 01:42:21 +0100 (BST)
On 23 Jun 2001, Daniel Elstner wrote:
> When -std=foo is given g++ doesn't recognize most C++ constructs.
> Includes of C++ specific headers do fail, too. For some odd reason
> the new-style casts do still work.
-std is not supported for C++. Why did the documentation make you think
that is was? Perhaps we can improve the documentation.
It would make sense to support -std for C++, with possible values being
iso14882:1998 and g++98, but it's never going to make sense to specify a C
standard (ISO 9899) version when compiling C++, and there ought to be
appropriate errors given if you try to do so; the lack of error messages
is a bug.
--
Joseph S. Myers
jsm28@cam.ac.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* c++/3385: -std=foo doesn't work with C++
@ 2001-06-22 17:36 Daniel Elstner
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Elstner @ 2001-06-22 17:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 3385
>Category: c++
>Synopsis: -std=foo doesn't work with C++
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 22 17:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Daniel Elstner
>Release: gcc-3.0 (release)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
When -std=foo is given g++ doesn't recognize most C++ constructs.
Includes of C++ specific headers do fail, too. For some odd reason
the new-style casts do still work.
The same code works with -ansi but not when using -std=iso9899:1990.
Configured with: ../../gcc/configure --prefix=/usr --enable-threads=posix --enable-version-specific-runtime-libs --disable-checking --enable-languages=f77,objc,c++
>How-To-Repeat:
g++ -std=c99 -c c99_test.cc
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="c99_test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="c99_test.cc"
CiNpbmNsdWRlIDx0eXBlaW5mbz4KI2luY2x1ZGUgPHN0cmluZz4KCm5hbWVzcGFjZSBBIHsKICAg
IGludCBmKCk7Cn0KCmludCBBOjpmKCkKewogICAgcmV0dXJuIDA7Cn0KCmludCBtYWluIChpbnQg
YXJnYywgY2hhciAqYXJndltdKQp7CiAgICBpbnQgaSA9IEE6OmYoKTsKICAgIHJldHVybiBpOwp9
Cgo=
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-04-26 11:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-23 2:16 c++/3385: -std=foo doesn't work with C++ Joseph S. Myers
-- strict thread matches above, loose matches on Subject: below --
2002-04-26 4:04 nathan
2001-06-23 7:06 Gabriel Dos Reis
2001-06-23 1:36 Neil Booth
2001-06-22 17:46 Joseph S. Myers
2001-06-22 17:36 Daniel Elstner
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).