tokens. */
unsigned int extra_tokens : 1;
- /* 1 bits spare (32-bit). 33 on 64-bit target. */
+ /* Imported C++20 macro (from a header unit). */
+ unsigned int imported_p : 1;
+
+ /* 0 bits spare (32-bit). 32 on 64-bit target. */
union cpp_exp_u
{
/* 5 bits spare. */
- /* On a 64-bit system there would be 32-bits of padding to the value
+ /* The deferred cookie is applicable to NT_USER_MACRO or NT_VOID.
+ The latter for when a macro had a prevailing undef.
+ On a 64-bit system there would be 32-bits of padding to the value
field. So placing the deferred index here is not costly. */
- unsigned deferred; /* Deferred index, (unless zero). */
+ unsigned deferred; /* Deferred cookie */
union _cpp_hashnode_value GTY ((desc ("%1.type"))) value;
};
macro->used = !CPP_OPTION (pfile, warn_unused_macros);
macro->count = 0;
macro->fun_like = 0;
+ macro->imported_p = false;
macro->extra_tokens = 0;
/* To suppress some diagnostics. */
macro->syshdr = pfile->buffer && pfile->buffer->sysp != 0;
cpp_get_deferred_macro (cpp_reader *pfile, cpp_hashnode *node,
location_t loc)
{
+ gcc_checking_assert (node->type == NT_USER_MACRO);
+
node->value.macro = pfile->cb.user_deferred_macro (pfile, loc, node);
if (!node->value.macro)
if (!macro)
{
macro = cpp_get_deferred_macro (pfile, node, loc);
- if (!macro)
- return NULL;
+ gcc_checking_assert (!macro || !macro->lazy);
}
-
- if (macro->lazy)
+ else if (macro->lazy)
{
pfile->cb.user_lazy_macro (pfile, macro, macro->lazy - 1);
macro->lazy = 0;