[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
glthread_cond_timedwait errors on C99 code
From: |
Tim Rühsen |
Subject: |
glthread_cond_timedwait errors on C99 code |
Date: |
Sat, 30 Sep 2017 15:33:30 +0200 |
User-agent: |
KMail/5.2.3 (Linux/4.12.0-2-amd64; KDE/5.37.0; x86_64; ; ) |
Hi,
just seeking for clarification...
The line
return glthread_cond_timedwait(&cond->cond, &mutex->mutex, &(struct
timespec){ .tv_sec = ms / 1000, .tv_nsec = (ms % 1000) * 1000000 });
errors with
thread.c:155:136: error: macro "glthread_cond_timedwait" passed 4 arguments,
but takes just 3
return glthread_cond_timedwait(&cond->cond, &mutex->mutex, &(struct
timespec){ .tv_sec = ms / 1000, .tv_nsec = (ms % 1000) * 1000000 });
This is with gcc 7.2.0 in C99 (default) mode. Is it the preprocessor, my code
or the macro broken ? Or a general C99 flaw ?
BTW, putting brackets () around the last argument makes it compile.
Anybody with some insights ?
Regards, Tim
signature.asc
Description: This is a digitally signed message part.
- glthread_cond_timedwait errors on C99 code,
Tim Rühsen <=