-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fails with -Werror=strict-aliasing #200
Comments
I can't replicate this. What version of GCC are you using? It compiles without warning for me using $ uname -a
Linux cthulhu 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
Did you add
|
Apologies, I can replicate it. It didn't throw an error when I tried compiling the single file. gcc -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fPIC -I../../../include -DCORES=48 -m64 -D__x86_64__ -D_GNU_SOURCE -o ck_pr_bin ck_pr_bin.c But doing:
does reproduce the same error for me. Edit: If it's helpful it's also possible to get the warning but still compile the code with |
Compilation fails with -Werror=strict-aliasing.
The text was updated successfully, but these errors were encountered: