ev.h:560: warning: nested extern declaration of 'ev_default_loop_ptr'
Mikhail T.
mi+thun at aldan.algebra.com
Thu Apr 4 18:54:24 CEST 2013
Trying to compile a simple test-program against libev-4.15 using
gcc-4.2.1 (the base compiler on FreeBSD), I get the following compiler
warning:
cc -O2 -pipe -march=nocona -fno-strict-aliasing -I/opt/include -Werror -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-unused-function -c libev-test.c
In file included from libev-test.c:10:
/opt/include/ev.h: In function 'ev_default_loop_uc_':
/opt/include/ev.h:560: warning: nested extern declaration of 'ev_default_loop_ptr'
Switching to gcc-4.8 triggers:
libev-test.c: In function 'main':
libev-test.c:43:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ev_io_init(&e, handler, dd, EV_WRITE|EV_READ);
which necessitates adding "-fno-strict-aliasing" to CFLAGS. Please,
advise. Thank you!
-mi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20130404/955d78ad/attachment.html>
More information about the libev
mailing list