NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/52285: <pthread_types.h> requires C99
>Number: 52285
>Category: bin
>Synopsis: <pthread_types.h> requires C99
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 08 15:05:01 +0000 2017
>Originator: Kamil Rytarowski
>Release: NetBSD 8.99.1 amd64
>Organization:
TNF
>Environment:
NetBSD chieftec 8.99.1 NetBSD 8.99.1 (GENERIC) #3: Thu Jun 8 12:59:05 UTC 2017 root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
>Description:
<pthread_types.h> requires C99 in C code:
#ifdef __cplusplus
#define _PTHREAD_MUTEX_INI(a, b) b
#define _PTHREAD_MUTEX_UNI(a) { 0 }
#else
#define _PTHREAD_MUTEX_INI(a, b) .a = b
#define _PTHREAD_MUTEX_UNI(a) .a = 0
#endif
--- src/libuv_la-threadpool.lo ---
src/threadpool.c:44:25: warning: designated initializers are a C99 feature [-Wc99-extensions]
static uv_once_t once = UV_ONCE_INIT;
^~~~~~~~~~~~
./include/uv-unix.h:136:22: note: expanded from macro 'UV_ONCE_INIT'
#define UV_ONCE_INIT PTHREAD_ONCE_INIT
^~~~~~~~~~~~~~~~~
/usr/include/pthread.h:292:28: note: expanded from macro 'PTHREAD_ONCE_INIT'
#define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INIT
^~~~~~~~~~~~~~~~~~
/usr/include/pthread_types.h:204:30: note: expanded from macro '_PTHREAD_ONCE_INIT'
#define _PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pthread.h:291:35: note: expanded from macro 'PTHREAD_MUTEX_INITIALIZER'
#define PTHREAD_MUTEX_INITIALIZER _PTHREAD_MUTEX_INITIALIZER
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pthread_types.h:150:2: note: expanded from macro '_PTHREAD_MUTEX_INITIALIZER'
_PTHREAD_MUTEX_INI(ptm_magic, _PT_MUTEX_MAGIC), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pthread_types.h:145:34: note: expanded from macro '_PTHREAD_MUTEX_INI'
#define _PTHREAD_MUTEX_INI(a, b) .a = b
^~~~~~
>How-To-Repeat:
Use Clang as your base system compiler.
Build pkgsrc packages.
PKGSRC_COMPILER= clang
PKG_CC= clang
PKG_CXX= clang++
CLANGBASE= /usr/local
>Fix:
Convert designated initializers to ANSI C 1989.
Home |
Main Index |
Thread Index |
Old Index