On Thu, Aug 08, 2024 at 10:44:31AM +0200, Jakub Jelinek wrote:
> I think the patch is at least a step in the direction of the paper's
> intent, but perhaps not full.  If we need to check for initial : or .
> in the expansion of the first identifier after the module name or
> module partition, not sure how it would be implemented

Maybe set some new NODE_* flag on the first CPP_NAME token after the
module name/partition unexpanded token iff it is some macro (object-like or
function-like) and in cpp_get_token_1 error if the first token from such
macro is CPP_DOT or CPP_COLON.  Ugly, but could work.

Or if the wording is changed to require that none of the pp-module-name or
pp-module-partition tokens come from macro expansion mark with some flag
all tokens from macro expansion.  We already have -ftrack-macro-expansion=,
but that can be disabled and we'd need to diagnose it even in that case.

        Jakub

Reply via email to