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]

Re: __has_include__ is problematic



Why not give the wierdo __has_include__ an unspellable name?
('builtin<SPACE>has<SPACE>include') and take care constructing the
__has_include macro expansion to have a token with exactly that
spelling?

Wouldn't that break -dM rather horribly?
pah!


However, the following thinks __DATE__ is a defined macro, so there must be some other subtlety with __has_include?

nathans@zathras:6>gcc -xc - <<EOF
#ifdef __DATE__
#error DATE IS A MACRO
#endif
EOF
<stdin>:2:2: error: #error DATE IS A MACRO

(typing that makes me realize why users think it is __has_include__, that's a really unfortunate name to use for an implementation detail)

nathan
--
Nathan Sidwell


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