bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing '_Noreturn'


From: Gisle Vanem
Subject: Re: Missing '_Noreturn'
Date: Mon, 27 Jul 2020 10:53:36 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Paul Eggert wrote:

-extern void dfawarn (const char *);
+extern _Noreturn void dfawarn (const char *);

That can't be right, as dfawarn typically does return.

Does the following work around the compiler bug? If not we can use stronger 
medicine.

diff --git a/tests/test-dfa-match-aux.c b/tests/test-dfa-match-aux.c
index e0c5f3df4..167b0ef8b 100644
--- a/tests/test-dfa-match-aux.c
+++ b/tests/test-dfa-match-aux.c
@@ -28,6 +28,9 @@

  #include "getprogname.h"

+_Noreturn void dfaerror (char const *);
+_Noreturn void dfawarn (char const *);
+
  _Noreturn void
  dfaerror (char const *mesg)
  {

No that's the same error:

test-dfa-match-aux.c
test-dfa-match-aux.c(32): error C2381: 'dfawarn': redefinition;
'__declspec(noreturn)' or '[[noreturn]]' differs
lib\dfa.h(125): note: see declaration of 'dfawarn'

test-dfa-match-aux.c(42): error C2381: 'dfawarn': redefinition;
'__declspec(noreturn)' or '[[noreturn]]' differs
lib\dfa.h(125): note: see declaration of 'dfawarn'

--
--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]