On 11/13/13 23:52, Mark H Weaver wrote:
'_Noreturn' is a bit ugly; if you don't care about
MSVC, then __attribute__((__noreturn__)) is
a good way to go.
Hi Paul,
Thanks. As mentioned in the GCC pages, using the prefix/suffix
of "__" is the right way to go -- for Guile.
FYI, I recently made precisely that change to the stable-2.0 branch,
which will become Guile 2.0.10:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=36c40440078c005cd5e239cca487d29f6f60007d;hp=b1fe20c24ccb380420ea1ffdc7f249224072dcdc
Thank you, Mark! Would you be willing to also do it for 1.8.x?
Many "stable" distros will take _years_ to advance to 2.x, but
for me I guess does not matter. I have to copy and edit Guile
headers in order to build at all.
My technique is to blindly replace anything after "SCM_NORETURN"
with "_Noreturn" on any line #define-ing SCM_NORETURN.
This is _always_ done when GL_GENERATE_STDNORETURN_H is defined
at "configure" time. That means I will be doing this in perpetuity,
unless I can get clear instructions about how to detect
that it is no longer necessary.
I think a better patch would be for Guile to defer to _Noreturn
whenever that is #define-d and _otherwise_ do what you do.
That way, if gnulib is in the mix, it is a gnulib job to
figure out the right value for SCM_NORETURN/_Noreturn.
The token "_Noreturn" is in the reserved-for-the-implementation
name space, so conforming applications should not be defining that
on their own.
Regards, Bruce