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
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev