https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79967
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- (In reply to Marek Polacek from comment #2) > It seems to be valid, clang++ accepts it and G++ too (with my patch). I don't have a strong opinion whether this should or should not be accepted but in comment #0 I said I thought it was "(presumably) ill-formed" because C++ specifies in [dcl.attr.noreturn] that: The attribute may be applied to the declarator-id in a function declaration. I don't think a template parameter is a "function declaration" but Jason might read it differently. We recently discussed what exactly the term "function declaration" is meant to cover in this context: https://gcc.gnu.org/ml/gcc-patches/2017-02/msg01075.html. If this code should be valid I think the standard needs to be clarified to list all the contexts where the attribute may be applied and what it means in each (where it isn't obvious). For instance, what does the attribute mean in the reported test case? It seems that it's ignored. Shouldn't GCC report -Wignored-attributes?