-std's (was Re: v3 link failures analyzed)

Joseph S. Myers jsm28@cam.ac.uk
Wed Jan 10 03:57:00 GMT 2001


On 10 Jan 2001, Gabriel Dos Reis wrote:

> Hmm, I'm having some trouble to understand why the short for the
> defaulted ISO standard should read '-ansi'.  Could you elaborate
> please?

-ansi is (for C) an obsolete option that exists only for backwards
compatibility.  Standards should be selected with -std only in new code.
For completeness, there should be -std=traditional or similar (equivalent
to -traditional) and the C++ compiler should also start to use -std (even
in the absence of supported old standard versions).

Note: there are *many* places in specs in the config directory that check
for -ansi, not for other -std options.  These really ought to be fixed
before -std can be recommended as an all-purpose substitute for -ansi.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list