This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Link with correct values-*.o files on Solaris (PR target/40411)

On Fri, 12 Jan 2018, Rainer Orth wrote:

> At the same time, I had a new look at when values-Xc.o is used by the
> Studio compilers.  It selects strict ISO C mode in a couple of cases,
> and the latest Studio 12.6 cc, which is about to do away with the
> previous -Xc option which enabled that mode in favour of gcc-compatible
> -pedantic, uses the latter to control its use.  So I've changed gcc to
> follow suit.

gcc -pedantic is only ever a diagnostic option, not a semantic one; it's 
incorrect to use it to change library semantics.  The relevant options for 
strict ISO C (and C++) modes are -ansi, -std=c*, -std=iso9899:199409 and 
aliases for those options.

-ansi is not defined as a .opt alias of -std=c90 (because the option it's 
an alias for depends on whether C or C++ is being compiled), so I'd expect 
the specs to need to handle it along with -std=c90.  I'd also expect 
-std=iso9899:199409 to need to be handled there, supposing handling it 
like -std=c90 is correct.  And what about C++ versions not based on C99 or 

Joseph S. Myers

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