Hi!
I'm testing new version of clang (3.6) on various software, and
libev doesn't build with it:
---
libtool: compile: clang36 -DHAVE_CONFIG_H -I. -O2 -pipe -march=nocona
-fstack-protector -fno-strict-aliasing -MT ev.lo -MD -MP -MF .deps/ev.Tpo -c
ev.c -fPIC -DPIC -o .libs/ev.o
ev.c:477:48: warning: '/*' within block comment [-Wcomment]
/*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */
^
ev.c:970:42: error: '_Noreturn' keyword must precede function declarator
ecb_inline void ecb_unreachable (void) ecb_noreturn;
^~~~~~~~~~~~
_Noreturn
ev.c:773:26: note: expanded from macro 'ecb_noreturn'
#define ecb_noreturn _Noreturn
---
Seems like C11 is now the default, however libev code is incorrect
C11-wise, as ecb_noreturn which expands to _Noreturn follows function
definition, while _Noreturn should preceed it.
Depending on whether it's allowed to place __attribute__ before
function, either ecb_noreturn should be moved before ecb_unreachable
declaration, or it should be split to e.g. ecb_pre_noreturn and
ecb_post_noreturn to work for both cases.
Full log with clang 3.4:
https://people.freebsd.org/~amdmi3/libev-clang34.log
Full log with clang 3.6:
https://people.freebsd.org/~amdmi3/libev-clang36.log
--
Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D
[email protected] ..: jabber: [email protected] http://www.amdmi3.ru
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev