This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]