This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
__STRICT_ANSI__ "fixes" on STDC_0_IN_SYSTEM_HEADERS (solaris) targets
- From: "Kaveh R. Ghazi" <ghazi at caipclassic dot rutgers dot edu>
- To: bkorb at gnu dot org
- Cc: ebotcazou at libertysurf dot fr, gcc at gcc dot gnu dot org
- Date: Sun, 1 Oct 2006 12:00:34 -0400 (EDT)
- Subject: __STRICT_ANSI__ "fixes" on STDC_0_IN_SYSTEM_HEADERS (solaris) targets
Hmm... I just noticed that fixincludes is applying the
strict_ansi_not, strict_ansi_not_ctd and strict_ansi_only fixes on
solaris. Recall, these are the fixes that replace various checks on
__STDC__ with __STRICT_ANSI__. I'm pretty sure it's not supposed to
be applied on solaris. All of these fixes call the following c_test:
c_test = stdc_0_in_system_headers;
And solaris defines STDC_0_IN_SYSTEM_HEADERS to 1 in its target
headers which is supposed to affect this c_test.
However I believe since fixincludes moved to the top level directory
we're no longer looking in the target headers and getting that
definition and thus the __STRICT_ANSI__ changes are always applied,
even when they're not supposed to be. This mechanism worked correctly
in gcc-3.4 which had fixincludes inside the gcc dir, and has been
broken since 4.0 when fixincludes moved to the top.
Am I reading the situation correctly? Thoughts on fixing it?
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu