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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15798 in the body.
You can then email your comments to 15798 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#15798; Package guile. (Sun, 03 Nov 2013 23:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Sicker <boards <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 03 Nov 2013 23:31:02 GMT) Full text and rfc822 format available.

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

From: Matt Sicker <boards <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Bad variable name "noreturn" in libguile/throw.h
Date: Sun, 3 Nov 2013 17:30:39 -0600
[Message part 1 (text/plain, inline)]
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.

-- 
Matt Sicker <boards <at> gmail.com>
[Message part 2 (text/html, inline)]

Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Tue, 05 Nov 2013 00:51:02 GMT) Full text and rfc822 format available.

Notification sent to Matt Sicker <boards <at> gmail.com>:
bug acknowledged by developer. (Tue, 05 Nov 2013 00:51:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: Matt Sicker <boards <at> gmail.com>
Cc: 15798-done <at> debbugs.gnu.org
Subject: Re: bug#15798: Bad variable name "noreturn" in libguile/throw.h
Date: Mon, 04 Nov 2013 19:48:29 -0500
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




Information forwarded to bug-guile <at> gnu.org:
bug#15798; Package guile. (Tue, 05 Nov 2013 01:49:02 GMT) Full text and rfc822 format available.

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

From: Jack Howarth <howarth <at> bromo.med.uc.edu>
To: 15798 <at> debbugs.gnu.org, mhw <at> netris.org, boards <at> gmail.com
Subject: Re: bug#15798: Bad variable name "noreturn" in libguile/throw.h
Date: Mon, 4 Nov 2013 20:48:32 -0500
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...

/*===---- stdnoreturn.h - Standard header for noreturn macro ---------------===
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 *===-----------------------------------------------------------------------===
 */

#ifndef __STDNORETURN_H
#define __STDNORETURN_H

#define noreturn _Noreturn
#define __noreturn_is_defined 1

#endif /* __STDNORETURN_H */

I only see the use of __attribute__((__noreturn__)) in /usr/include/c++/4.2.1/
on darwin13 (aka libstdc++). The /Library/Developer/CommandLineTools/usr/lib/c++/v1 directory
for libc++ only shows the usage of __attribute__((noreturn)) and not any usages of
__attribute__((__noreturn__)).
             Jack
ps Also see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15807.




Information forwarded to bug-guile <at> gnu.org:
bug#15798; Package guile. (Tue, 05 Nov 2013 02:50:02 GMT) Full text and rfc822 format available.

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Dec 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 146 days ago.

Previous Next


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