This is the mail archive of the 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: -std's (was Re: v3 link failures analyzed)

Joseph S Myers <> writes:

> It might have been better for GCC to have been designed with such a mode
> (-std=isowhatever -pedantic) as the default, but that's not the design
> we have now.

The significant problem with doing this with -ansi is that -ansi defines
__STRICT_ANSI__ and defining __STRICT_ANSI__ (or other related similar
things) makes the system library practically unusable on many platforms.
Half the useful functions in some headers disappear and one has to hunt up
all sorts of obscure feature macros to define to bring them back, macros
that practically no one actually uses.  And on top of that, many platforms
are buggy in this area and even with defining feature macros, you can't
bring back a lot of the stuff that you want.

According to the gcc manual, using -ansi also disables built-ins for some
standard functions.

I've been worrying a little about that when seeing various very useful
stuff that I'm going to want to take advantage of eventually be turned on
by an appropriate -std flag.  Is using the -std flags going to cause the
same problems that makes -ansi almost unusuable even if one really *wants*
to tell the compiler not to define preprocessor symbols in the user
namespace and the other useful things that -ansi does?

Russ Allbery (             <>

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