This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TARGET_* target hook inconsistency
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 31 May 2002 18:50:08 -0400
- Subject: TARGET_* target hook inconsistency
In target-def.h most of the macros are unconditionally defined. The
documentation states that such "target hooks" should be undef/defined
after including target-def.h (you certainly can't define them *before*
including target-def.h).
However, some of the target hooks are protected with #ifndefs, and are
used in #ifs. Obviously, those must be defined *before* target-def.h
is included.
The documentation doesn't discriminate between the two types, though.
It labels them both "target hooks", which seems to contradict the .h
file.
For example, TARGET_ASM_NAMED_SECTION is a target hook:
@deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION ...
But it is is assumed set or not in target-def.h:
# ifdef TARGET_ASM_NAMED_SECTION