unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#15798: Bad variable name "noreturn" in libguile/throw.h
@ 2013-11-03 23:30 Matt Sicker
  2013-11-05  0:48 ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Sicker @ 2013-11-03 23:30 UTC (permalink / raw)
  To: 15798

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

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@gmail.com>

[-- Attachment #2: Type: text/html, Size: 542 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15798: Bad variable name "noreturn" in libguile/throw.h
  2013-11-03 23:30 bug#15798: Bad variable name "noreturn" in libguile/throw.h Matt Sicker
@ 2013-11-05  0:48 ` Mark H Weaver
  2013-11-05  1:48   ` Jack Howarth
  0 siblings, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2013-11-05  0:48 UTC (permalink / raw)
  To: Matt Sicker; +Cc: 15798-done

Matt Sicker <boards@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15798: Bad variable name "noreturn" in libguile/throw.h
  2013-11-05  0:48 ` Mark H Weaver
@ 2013-11-05  1:48   ` Jack Howarth
  2013-11-05  2:47     ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Howarth @ 2013-11-05  1:48 UTC (permalink / raw)
  To: 15798, mhw, boards

On Mon, Nov 04, 2013 at 07:48:29PM -0500, Mark H Weaver wrote:
> Matt Sicker <boards@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#15798: Bad variable name "noreturn" in libguile/throw.h
  2013-11-05  1:48   ` Jack Howarth
@ 2013-11-05  2:47     ` Mark H Weaver
  0 siblings, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2013-11-05  2:47 UTC (permalink / raw)
  To: Jack Howarth; +Cc: boards, 15798

Jack Howarth <howarth@bromo.med.uc.edu> writes:

> On Mon, Nov 04, 2013 at 07:48:29PM -0500, Mark H Weaver wrote:
>> Matt Sicker <boards@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-05  2:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 23:30 bug#15798: Bad variable name "noreturn" in libguile/throw.h Matt Sicker
2013-11-05  0:48 ` Mark H Weaver
2013-11-05  1:48   ` Jack Howarth
2013-11-05  2:47     ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).