This is the mail archive of the
mailing list for the GCC project.
Re: -std's (was Re: v3 link failures analyzed)
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: -std's (was Re: v3 link failures analyzed)
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Wed, 10 Jan 2001 12:15:41 +0000 (GMT)
- cc: <libstdc++ at gcc dot gnu dot org>, <gcc at gcc dot gnu dot org>
On 10 Jan 2001, Gabriel Dos Reis wrote:
> Thanks. Now I understand the motivation. But I still think that
> there should be an alias for the most recent standard in effect
> (and understood by the compiler).
Under what circumstances would such an option be useful?
In a controlled environment, the compiler version used everywhere is
known, and the standard option can be specified in a single place.
In an uncontrolled environment (code distributed widely), if the source is
written to a standard then it's presumably written to a particular edition
of the standard. In any case, it presumably has a standard version (maybe
a GNU one) with which it's known to work, and using a later one because a
newer compiler happens to support it would just risk gratuitous breakage.
If you want to specify a standard (rather than risk breakage as the
default goes gnu89 -> gnu99 -> gnu0x -> ...), why risk breakage by using
an unknown latest version?
What counts as "understood by the compiler"? Does GCC presently
understand C99 (the -std option is there, but many features are missing)?
Joseph S. Myers