* Paul Eggert: > On 7/26/20 3:10 PM, Gisle Vanem wrote: >> Here's an error though: >> >> test-dfa-match-aux.c >> test-dfa-match-aux.c(39): error C2381: 'dfawarn': redefinition; >> '__declspec(noreturn)' or '[[noreturn]]' differs >> lib\dfa.h(125): note: see declaration of 'dfawarn' > > That's a bug in MSVC. _Noreturn and 'inline' are not part of a > function's type, so the definition of a function can say '_Noreturn' > even though its declaration does not. (Admittedly it's bad style.)
The compiler is correct for [[noreturn]]: | The first declaration of a function shall specify the noreturn | attribute if any declaration of that function specifies the noreturn | attribute. <http://eel.is/c++draft/dcl.attr.noreturn#:attribute,noreturn> I agree that the test needs fixing. Thanks, Florian