The clever hack of '#define __has_include __has_include' breaks -dD and -fdirectives-only, because that emits definitions. This turns __has_include into a proper builtin macro. Thus it's never emitted via -dD, and because use outside of directive processing is undefined, we can just expand it anywhere. PR preprocessor/93452 * internal.h (struct spec_nodes): Drop n__has_include{,_next}. * directives.c (lex_macro_node): Don't check __has_include redef. * expr.c (eval_token): Drop __has_include eval. (parse_has_include): Move to ... * macro.c (builtin_has_include): ... here. (_cpp_builtin_macro_text): Eval __has_include{,_next}. * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_INCLUDE{,_NEXT}. * init.c (builtin_array): Add them. (cpp_init_builtins): Drop __has_include{,_next} init here ... * pch.c (cpp_read_state): ... and here. * traditional.c (enum ls): Drop has_include states ... (_cpp_scan_out_logical_line): ... and here.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
include | Loading commit data... | |
po | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.jit | Loading commit data... | |
Makefile.in | Loading commit data... | |
aclocal.m4 | Loading commit data... | |
charset.c | Loading commit data... | |
config.in | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
directives-only.c | Loading commit data... | |
directives.c | Loading commit data... | |
errors.c | Loading commit data... | |
expr.c | Loading commit data... | |
files.c | Loading commit data... | |
generated_cpp_wcwidth.h | Loading commit data... | |
identifiers.c | Loading commit data... | |
init.c | Loading commit data... | |
internal.h | Loading commit data... | |
lex.c | Loading commit data... | |
line-map.c | Loading commit data... | |
location-example.txt | Loading commit data... | |
macro.c | Loading commit data... | |
makeucnid.c | Loading commit data... | |
mkdeps.c | Loading commit data... | |
pch.c | Loading commit data... | |
symtab.c | Loading commit data... | |
system.h | Loading commit data... | |
traditional.c | Loading commit data... | |
ucnid.h | Loading commit data... | |
ucnid.tab | Loading commit data... |