https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114007

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Sandiford from comment #14)
> I might have misunderstood the suggestion and so be arguing against
> something that no-one is suggesting, but I think [[__extension__ …]] should
> accept the same things for all standard versions (C23, pre-C23, and GNU). 
> It was intended to be something that header files and macros could use
> without needing to be sensitive to the user's choice of standard.

That is still the case of [[__extension__ arm::streaming]] and similar.
The only thing in the suggestion that would be only sometimes allowed would be
[[__extension__ arm: :streaming]]
(or [[__extension__ arm:/**/:streaming]] etc.
which I'd hope nobody is planning to use in the header files.
Basically, with the flag_iso && !flag_isoc23 modes, :: is not one token but 2,
and while we in some cases could look at location info if they are adjacent in
the source, if column info isn't accurate (too long lines or too many lines)
that information is lost.
Or of course if you'd strongly like to accept [[__extension__ arm: :streaming]]
in all language modes (but it won't be accepted in C++ anyway), I'd at least
like to see accepting [[arm::streaming]] in the flag_iso && !flag_isoc23 modes
(with the usual pedwarn).
If we only wanted adjacent ::s and nothing in between, perhaps the preprocessor
could set some flag on one of the CPP_COLONs (or both) if otherwise for
CPP_OPTION (pfile, scope) it would be creating CPP_SCOPE, and check that flag
during attribute and __has*attribute parsing?

Reply via email to