https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109756
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Trying other standard attributes, we accept
template <int ...args>
[[noreturn...]] [[deprecated...]] [[nodiscard...]]
int foo (int x)
{
switch (x)
{
case 1:
[[likely...]];
[[fallthrough...]];
case 2:
[[unlikely...]];
break;
default:
break;
}
struct T {};
struct S { [[no_unique_address...]] T t; };
for (;;)
;
}
int a = foo <1, 2, 3> (4);
and just emit the deprecated warning, while clang++ rejects all those.