This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i18n of egcs


>> Well, we can have a -iso option that defaults to the current standard
>> which can be overriden by -std= option. No? 
>
>Certainly.  Let -iso mean "the ISO standard currently in effect for
>the language in use", same for -ansi/ANSI standard.  For C and C++,
>the two are the same.

And remember, we were discussing having `-iso' have the same *effect*
as `-ansi'.

So, the purpose of `-iso' would be basically the same as `-ansi', and, as
Joe rightly explains, for C/C++, it would be *exactly* the same, since
the prevailing ISO and ANSI standards are identical.

At least, it is my feeling that the purpose of `-ansi' and `-iso' are to
tell the compiler that the language is "strict" ANSI/ISO *whatever*,
depending on what is being compiled.  Specifying *whatever* is done
via the filename suffix, `-x', and `-std'.  And `-pedantic' turns on
even stricter checking than is necessary to compile ANSI/ISO-conforming
code, as explained in the gcc docs for `-ansi'.

What's unclear is how gcc is supposed to handle `-std=iso-something -ansi'.
My suggestion is, anytime the ISO standard explicitly prevails (either
via command-line option or via input language), `-ansi' has no effect
*for that source file*, but might still affect others.

(Unfortunately, I can't find `-std=' documented in egcs/gcc/invoke.texi,
so I don't know whether it's intended to just specify the standard for
files determined, by other means, to be of the pertinent language, or
to have the effect of specifying that language, like `-x'.)

        tq vm, (burley)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]