bug-rcs
[Top][All Lists]
Advanced

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

[rcs-5.9.4] _Noreturn left undefined on Yosemite


From: Christian Wagner
Subject: [rcs-5.9.4] _Noreturn left undefined on Yosemite
Date: Tue, 27 Jun 2017 17:05:31 +0000 (UTC)

Hi,

When running "make" to compile RCS 5.9.4 on MacOS/X Yosemite, the compilation of "src/b-anchor.c" leads to error messages of the type:

  In file included from b-anchor.c:21:
  ./base.h:758:3: error: '_Noreturn' keyword must precede function declarator
    exiting;
    ^~~~~~~
  ./base.h:44:18: note: expanded from macro 'exiting'
  #define exiting  _Noreturn


In "lib/config.h", the conditional directive defining _Noreturn starts with:

  #if ! (defined _Noreturn \
         || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))

and has no alternative branch. So if _Noreturn is not defined but "(defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)" is, then _Noreturn will never be defined.

Yet, as shown by base.h, it seems that the code of RCS relies on _Noreturn being defined.

If I add the (missing?) alternative to the aforementioned conditional preprocessor directive, i.e. if I add "#define _Noreturn" (the default definition in the 1st branch of the conditional directive), the code compiles with no further error.

"Configure" was run without specifying any option. No changes whatsoever were made to the distribution prior to executing the failing call to "make".

What do you think?

--Christian

My environment is:
- MacOS/X Yosemite (10.10.5)
- Darwin Kernel Version 14.5.0: Tue Apr 11 16:12:42 PDT 2017; root:xnu-2782.50.9.2.3~1/RELEASE_X86_64 x86_64
- C Compiler (shipped with Xcode):
  Apple LLVM version 7.0.2 (clang-700.1.81)
  Target: x86_64-apple-darwin14.5.0
  Thread model: posix


reply via email to

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