This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add tgmath.h
Geoff Keating <geoffk@geoffk.org> writes:
[...]
| I don't believe the current situation is the result of a conscious
| decision to not provide particular headers simply because they are not
| part of a freestanding implementation. Indeed, the documentation says
| that
|
| > GCC aims towards being usable as a conforming freestanding
| > implementation, or as the compiler for a conforming hosted
| > implementation.
|
| and as the compiler for a conforming implementation, it is properly
| responsible for certain compiler-specific header files, like tgmath.h.
I guess I disagree with the assertion that the current situation is
not a conscious decision. It has always been the case that, for hosted
implementations, GCC explicitly expects the target to provide a C
library implementation. Only in few occasions do we provide our own
headers -- and they mostly derive from fixincludes or are required
for freestandaning implementation.
(And for a case at point, see the thread about cross-compiling GCC
from Linux to Sparc/Solaris).
That situation can be understood, as various standards and existing
practice have made contradictory requirements on C headers.
Consequently it is hard for GCC to provide a C library implementation
without essentially reimplementing substantial parts of the target
system headers. This situations affects conformance of vairous
components. For example, the our C++ standard library is defective in
many aspects pricesely because of that policy.
Now, if you think we should revert from our common working
assumptions, then I would not disagree. I would just ask we clearly
define our expectations and user expectations. This is also for the
interest of other components shipped with GCC, e.g. libstdc++. I can
see large benefits from tighter coupling of the C library
implementation and GCC.
However, I don't think it is fair to locally redefine things based on
interested random patches.
-- Gaby