I wrote: > I guess I need to test things with some older versions of gcc and g++ as well, > and with MSVC, before we can jump to conclusions.
Here are the results. Let 1, 2, 3, 4, 5 denote the respective positions: XX extern void foo1 (void); extern XX void foo2 (void); extern void XX foo3 (void); extern void foo4 XX (void); extern void foo5 (void) XX; Valid positions of _Noreturn in GCC (C mode): 1 2 3 starting with gcc 4.7 Valid positions of __attribute__((__noreturn__)) in GCC (C mode): 1 2 3 5 since 2.95.3 at least Valid positions of __attribute__((__noreturn__)) in g++: 1 2 3 5 since 3.1 at least Valid positions of [[noreturn]] in g++: 1 4 starting with gcc 6 or g++ -std=c++11 4.8 The positions 2 3 5 generate warnings "ignored", starting with gcc 6 or g++ -std=c++11 4.8 Valid positions of _Noreturn in clang (C mode): 1 2 3 Valid positions of __attribute__((__noreturn__)) in clang (C mode): 1 2 3 5 Valid positions of __attribute__((__noreturn__)) in clang (C++ mode): 1 2 3 5 Valid positions of [[noreturn]] in clang (C++ mode): 1 4 but only with option -std=c++11 Valid positions of __declspec(noreturn) in MSVC 15 (C mode): 1 2 3 Valid positions of __declspec(noreturn) in MSVC 15 (C++ mode): 1 2 3 Valid positions of [[noreturn]] in MSVC 15 (C++ mode): 1 4 Bruno