[rcs-5.9.4] _Noreturn left undefined on Yosemite

Christian Wagner <[email protected]> Tue, 27 Jun 2017 17:05:31 +0000 (UTC)
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
------=_Part_5546960_847061246.1498583131424
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,
When running "make" to compile RCS 5.9.4 on MacOS/X Yosemite, the compilati=
on of "src/b-anchor.c" leads to error messages of the type:
=C2=A0 In file included from b-anchor.c:21:=C2=A0 ./base.h:758:3: error: '_=
Noreturn' keyword must precede function declarator=C2=A0 =C2=A0 exiting;=C2=
=A0 =C2=A0 ^~~~~~~=C2=A0 ./base.h:44:18: note: expanded from macro 'exiting=
'=C2=A0 #define exiting =C2=A0_Noreturn

In "lib/config.h", the conditional directive defining _Noreturn starts with=
:
=C2=A0 #if ! (defined _Noreturn \=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|| (defi=
ned __STDC_VERSION__ && 201112 <=3D __STDC_VERSION__))
and has no alternative branch. So if _Noreturn is not defined but "(defined=
 __STDC_VERSION__ && 201112 <=3D __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 prepr=
ocessor directive, i.e. if I add "#define _Noreturn" (the default definitio=
n in the 1st branch of the conditional directive), the code compiles with n=
o further error.
"Configure" was run without specifying any option. No changes whatsoever we=
re 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 x8=
6_64
- C Compiler (shipped with Xcode):=C2=A0 Apple LLVM version 7.0.2 (clang-70=
0.1.81)=C2=A0 Target: x86_64-apple-darwin14.5.0=C2=A0 Thread model: posix

------=_Part_5546960_847061246.1498583131424
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div style=3D"color:#000; background-color:#fff; f=
ont-family:lucida console, sans-serif;font-size:13px"><div id=3D"yui_3_16_0=
_1_1498581766076_4343">Hi,</div><div id=3D"yui_3_16_0_1_1498581766076_4343"=
><br></div><div id=3D"yui_3_16_0_1_1498581766076_4343" dir=3D"ltr">When run=
ning "make" to compile RCS 5.9.4 on MacOS/X Yosemite, the compilation of "s=
rc/b-anchor.c" leads to error messages of the type:</div><div id=3D"yui_3_1=
6_0_1_1498581766076_4343" dir=3D"ltr"><br></div><div dir=3D"ltr" id=3D"yui_=
3_16_0_1_1498581766076_4477">&nbsp; In file included from b-anchor.c:21:</d=
iv><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4478">&nbsp; ./base.h:=
758:3: error: '_Noreturn' keyword must precede function declarator</div><di=
v dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4479">&nbsp; &nbsp; exiting;=
</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4480">&nbsp; &nbsp;=
 ^~~~~~~</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4481">&nbsp=
; ./base.h:44:18: note: expanded from macro 'exiting'</div><div dir=3D"ltr"=
 id=3D"yui_3_16_0_1_1498581766076_4482">&nbsp; #define exiting &nbsp;_Noret=
urn</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4483"><br id=3D"=
yui_3_16_0_1_1498581766076_4484"></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_=
1498581766076_4483"><br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_149858176=
6076_4483">In "lib/config.h", the conditional directive defining _Noreturn =
starts with:</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4483"><=
div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4536"><br></div><div dir=
=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4536">&nbsp; #if ! (defined _Nore=
turn \</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4537">&nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp;|| (defined __STDC_VERSION__ &amp;&amp; 201112 &=
lt;=3D __STDC_VERSION__))</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_14985817=
66076_4538"><br id=3D"yui_3_16_0_1_1498581766076_4539"></div><div dir=3D"lt=
r" id=3D"yui_3_16_0_1_1498581766076_4538">and has no alternative branch. So=
 if _Noreturn is not defined but "(defined __STDC_VERSION__ &amp;&amp; 2011=
12 &lt;=3D __STDC_VERSION__)" is, then _Noreturn will never be defined.</di=
v><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4538"><br></div><div di=
r=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4538">Yet, as shown by base.h, i=
t seems that the code of RCS relies on _Noreturn being defined.</div><div d=
ir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4538"><br></div><div dir=3D"ltr=
" id=3D"yui_3_16_0_1_1498581766076_4538">If I add the (missing?) alternativ=
e to the aforementioned conditional preprocessor directive, i.e. if I add "=
#define _Noreturn" (the default definition in the 1st branch of the conditi=
onal directive), the code compiles with no further error.</div><div dir=3D"=
ltr" id=3D"yui_3_16_0_1_1498581766076_4538"><br></div><div dir=3D"ltr" id=
=3D"yui_3_16_0_1_1498581766076_4538">"Configure" was run without specifying=
 any option. No changes whatsoever were made to the distribution prior to e=
xecuting the failing call to "make".</div><div dir=3D"ltr" id=3D"yui_3_16_0=
_1_1498581766076_4538"><br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_149858=
1766076_4538">What do you think?</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1=
498581766076_4538"><br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766=
076_4538">--Christian</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_149858176607=
6_4538"><br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4538">M=
y environment is:</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_45=
38">- MacOS/X Yosemite (10.10.5)</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1=
498581766076_4538">- 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<br></div><div dir=3D"l=
tr" id=3D"yui_3_16_0_1_1498581766076_4538">- C Compiler (shipped with Xcode=
):</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4538"><div dir=3D=
"ltr" id=3D"yui_3_16_0_1_1498581766076_4868">&nbsp; Apple LLVM version 7.0.=
2 (clang-700.1.81)</div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1498581766076_4=
869">&nbsp; Target: x86_64-apple-darwin14.5.0</div><div dir=3D"ltr" id=3D"y=
ui_3_16_0_1_1498581766076_4870">&nbsp; Thread model: posix</div><div dir=3D=
"ltr" id=3D"yui_3_16_0_1_1498581766076_4870"><br></div></div></div></div></=
body></html>
------=_Part_5546960_847061246.1498583131424--