if (!name)
abort ();
}
- if (pfile->cb.remap_filename)
+ if (pfile->cb.remap_filename && !pfile->state.in_directive)
name = pfile->cb.remap_filename (name);
len = strlen (name);
buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
if (argc < macro->paramc)
{
- /* In C++20 (here the va_opt flag is used), and also as a GNU
+ /* In C++20 and C2X (here the va_opt flag is used), and also as a GNU
extension, variadic arguments are allowed to not appear in
the invocation at all.
e.g. #define debug(format, args...) something
token = cpp_get_token (pfile);
if (token->type != CPP_PADDING)
break;
+ gcc_assert ((token->flags & PREV_WHITE) == 0);
if (padding == NULL
- || (!(padding->flags & PREV_WHITE) && token->val.source == NULL))
+ || padding->val.source == NULL
+ || (!(padding->val.source->flags & PREV_WHITE)
+ && token->val.source == NULL))
padding = token;
}