On Thu, Apr 04, 2013 at 12:54:24PM -0400, Mikhail T. wrote: > 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!
You can't really compile libev stuff with compiler warnings activated. You'll have to avoid using libev macros or turn the warnings off.
signature.asc
Description: Digital signature
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
