Invalid attribute accepted dealing with # and ## operators (original) (raw)

Forwarded from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120978 because clang is the only major compiler which accepts this (EDG, GCC and MSVC all reject this for having # and ## operators outside of macros).

[[ignored::ignored(##)]]int main(){}

The way I read the standard is during phase 4, this should be diagnostic as invalid. Which is exactly how GCC, EDG and MSVC all do as ## operator is invalid outside of the function like macros.

But I could be reading the spec wrong but with clang being the odd one out though; it looks more likely a clang issue.