This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/15404] Two conflict defines for __sigsetjmp in pthread.h and setjmp.h


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

Guoshun WU <guoshun.wu@al-enterprise.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |guoshun.wu@al-enterprise.co
                   |                            |m

--- Comment #5 from Guoshun WU <guoshun.wu@al-enterprise.com> ---
Here is a self-contained test case.

// file mytest.cpp
#include <stdio.h>

#include <setjmp.h>
#include <pthread.h>

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

// clang++ -Wall -o test22 mytest.cpp
int main(int argc, char* argv[]){
    (void)argc;
    (void)argv;
    printf("c++ __sigsetjmp conflict in setjmp.h and pthread.h\n");
    return 0;
}

==================
clang++ -Wall -o test22 mytest.cpp
In file included from mytest.cpp:5:
/usr/include/pthread.h:754:12: error: conflicting types for '__sigsetjmp'
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
           ^
/usr/include/setjmp.h:59:12: note: previous declaration is here
extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask)
__THROWNL;
           ^
1 error generated.

clang++ --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]