GNU bug report logs - #15798
Bad variable name "noreturn" in libguile/throw.h

Previous Next

Package: guile;

Reported by: Matt Sicker <boards <at> gmail.com>

Date: Sun, 3 Nov 2013 23:31:02 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 15798 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Jack Howarth <howarth <at> bromo.med.uc.edu>
Cc: boards <at> gmail.com, 15798 <at> debbugs.gnu.org
Subject: Re: bug#15798: Bad variable name "noreturn" in libguile/throw.h
Date: Mon, 04 Nov 2013 21:47:49 -0500
Jack Howarth <howarth <at> bromo.med.uc.edu> writes:

> On Mon, Nov 04, 2013 at 07:48:29PM -0500, Mark H Weaver wrote:
>> Matt Sicker <boards <at> gmail.com> writes:
>> > In the function scm_ithrow, the parameter "int noreturn" is given. Now
>> > this works fine normally, but if stdnoreturn.h is included before
>> > throw.h (or libguile.h more likely), then this causes a compilation
>> > error. In throw.c, noreturn is even marked as an unused variable, so
>> > this is even more annoying! I recommend using "no_return" to prevent
>> > any namespace conflicts.
>> 
>> Fixed in stable-2.0.  Thanks for the report.
>> 
>> http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=36c40440078c005cd5e239cca487d29f6f60007d
>> 
>>     Mark
>> 
>> 
>
> What is the motivation to change from attribute (noreturn) to attribute (__noreturn__). Xcode 5.0
> has /Library/Developer/CommandLineTools/usr/lib/clang/5.0/include/stdnoreturn.h with...
>
[...]
>
> #ifndef __STDNORETURN_H
> #define __STDNORETURN_H
>
> #define noreturn _Noreturn
> #define __noreturn_is_defined 1

Yes, and this is a problem.  If this file has been included before
__scm.h, then I expect that __attribute__((noreturn)) will expand to
__attribute__((_Noreturn)) which will most likely fail.  That was the
motivation for this change.

> ps Also see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15807.

I will respond to that bug report in a separate message.

     Mark




This bug report was last modified 11 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.