public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29399] New: Wrong definition of setjmp
@ 2022-07-24 19:25 pavel.morozkin at gmail dot com
  2022-07-24 21:28 ` [Bug libc/29399] " sam at gentoo dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pavel.morozkin at gmail dot com @ 2022-07-24 19:25 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29399

            Bug ID: 29399
           Summary: Wrong definition of setjmp
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: pavel.morozkin at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The setjmp is defined as:
#define setjmp(env)     _setjmp (env)

This is wrong because it breaks the following code:
#include <setjmp.h>

void f(void)
{
    struct { int x; } _setjmp;
    jmp_buf x;
    setjmp(x);
}

In file included from <source>:1:
<source>: In function 'f':
<source>:7:5: error: called object '_setjmp' is not a function or function
pointer
    7 |     setjmp(x);
      |     ^~~~~~
<source>:5:23: note: declared here
    5 |     struct { int x; } _setjmp;
      |                       ^~~~~~~
Compiler returned: 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-07-29 15:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24 19:25 [Bug libc/29399] New: Wrong definition of setjmp pavel.morozkin at gmail dot com
2022-07-24 21:28 ` [Bug libc/29399] " sam at gentoo dot org
2022-07-24 21:34 ` ldv at sourceware dot org
2022-07-24 22:06 ` pavel.morozkin at gmail dot com
2022-07-24 22:09 ` schwab@linux-m68k.org
2022-07-28 16:33 ` pavel.morozkin at gmail dot com
2022-07-28 16:50 ` fweimer at redhat dot com
2022-07-28 19:38 ` zackw at panix dot com
2022-07-29  6:53 ` pavel.morozkin at gmail dot com
2022-07-29 12:25 ` fweimer at redhat dot com
2022-07-29 14:03 ` pavel.morozkin at gmail dot com
2022-07-29 15:53 ` schwab@linux-m68k.org

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).