G++ defines _GNU_SOURCE, implies C99
Gabriel Dos Reis
gdr@integrable-solutions.net
Fri Sep 13 16:52:00 GMT 2002
Michael Eager <eager@mvista.com> writes:
| Phil Edwards wrote:
| >
| > On Fri, Sep 13, 2002 at 03:37:59PM -0700, Michael Eager wrote:
| > > So, can anyone elucidate why _GNU_SOURCE is defined by G++ and
| > > not by GCC and/or why it implies _USE_ISOC99?
| >
| > C++ requires more smarts from the C library, and from the surrounding
| > environment, than most languages. With current C++ library sources and
| > current typical system headers, the only way to get that support is to
| > request extra standards-conforming behavior. Usually this is for I/O.
|
| What C99 behavior is required by C++?
Well C++ doesn't not require C99 --- C++ references C90.
However C++ supports 'long long' as an extension. Which means that V3
has to provide the appropriate I/O support.
[...]
| For this one small part of the problem, does _GNU_SOURCES really need
| to define _USE_ISOC99?
I'm not sure it should. However, V3 needs to handle C99 existence --
pretending C99 doesn't existing isn't realistic as a long term plan.
In the future, we'll do better job on Glibc systems.
-- Gaby
More information about the Gcc-bugs
mailing list