Re: -std=C++11 and strict ANSI compliance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[I accidentally replied to Jonathan intead of to the list]

Jonathan Wakely to Anton Shepelev:

> > On  the  other  hand,  fileno  is  available  in
> > stdio.h on Linux with -std=C++11.  Is it  a  de-
> > fect,  a  courtesy  of  the developers, or a re-
> > quirement for a POSIX OS?
>
> That's  because  g++  on  GNU/Linux  also  defines
> _GNU_SOURCE for ALL -std options (this is in addi-
> tion to __STRICT_ANSI__ if you used  a  -std=c++NN
> option).  Defining  _GNU_SOURCE  exposes all POSIX
> functions and GNU extensions.
>
> I intend to change that one  day,  so  _GNU_SOURCE
> will never be automatically defined by the compil-
> er.

Thank you for the explanation.  Is  it  possible  to
make the current GCC with -std=CNN behave as you in-
tend it to?  Will, for example, the  following  suf-
fice:   gcc -std=c++11 -U_GNU_SOURCE   ?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux