Tim Rühsen
2017-09-30 13:33:30 UTC
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
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