You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to compile with LTO: -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
The -Werror=* flags are important to detect cases where the compiler can try to optimize based on assuming UB cannot happen, and miscompile code that has UB in it. strict-aliasing issues are always bad but LTO can make them even worse.
I got this error:
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -DCONFDIR='"/etc"' -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -c -o portspoof-connection.o `test -f 'connection.cpp' || echo './'`connection.cpp
connection.cpp: In function ‘void* process_connection(void*)’:
connection.cpp:92:22: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
92 | int tid = *((int*)(&arg));
| ~^~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [Makefile:455: portspoof-connection.o] Error 1
I tried to compile with LTO:
-flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
The -Werror=* flags are important to detect cases where the compiler can try to optimize based on assuming UB cannot happen, and miscompile code that has UB in it. strict-aliasing issues are always bad but LTO can make them even worse.
I got this error:
Downstream report: https://bugs.gentoo.org/861698
Full build log: build.log
The text was updated successfully, but these errors were encountered: