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
Strict C90 CFLAGS results in sha.h:91 ISO C90 does not support long long #10547
Comments
What platform and config args did you use? The 64bit datatype might be something other than "long long" |
Merely a follow up but if one relaxes these options a tad and stays with C90 then we hit an "asm" wall :
So perhaps other flags or config options are needed in order for C90 compliance? Dennis |
Thanks for the snap fast reply! This is Debian Linux "sid" on Intel 32-bit with nothing particularly special at all. Let's take a look with and without the pedantic options :
Right, so here gcc has a fit due to "pedantic" options. Take them away ?
Well I think 64-bit is fine here. Dennis |
Er, no. Let's take a look at your config command. Please. OR follow the instructions and post the output of the dump command. |
We're frankly not 100% strict with asm, obviously. On the other hand, the asm stuff requires specific compilers, where we know it's supported. Therefore, trying à pure C90 build can only be assumed to pass with a (we could spend time on moving this inline asm sections, but since they are relatively small, it doesn't seem worth the effort) |
.travis.yml has one configuration where we do a check of a C89 build. Look for |
OKay ... I am perhaps being a bit pedantic here ( nothing new ) and I can remove the "pedantic" options and also configure with --debug and "no-asm". This is precisely what I am doing now. All of this is merely so that I can single step into some other code that is linked with libcrypto.so and that explains how I fell into this. The Configuration was done with 10-main.conf slightly modified merely to slip in these CFLAGS :
That seems to be compiling fine now. Very odd that pedantic C90 compliance throws these errors however going with no-asm may solve this neatly. Regardless here is the "dump" : Dennis |
As I slow through this I hit other problems :
There must be other people that have tried this sort of build I hope? |
I needed a small patch inside a questionable bit of code which uses " if (1) " for some reason :
For reasons unknown that data is not picked up from within /usr/include/netdb.h and perhaps that is due to using -D_XOPEN_SOURCE=600 regardless the end result passes ALL tests in the testsuite and that is the litmus paper test for me. So I used these flags :
Also I must use no-asm as well as --debug but eventually I get a decent result. I may patch and clean up that strange " if (1) " in crypto/bio/b_addr.c -- |
|
|
Somewhat loosely related to #8048 wherein we all agree that the codebase is compliant with C90. However while trying a build with strict C90 flags I see :
Seems reasonable to re-try that build with no CFLAGS of any particular compliance flavour however I am curious why C90 clean code would have any issue whatsoever?
Dennis
The text was updated successfully, but these errors were encountered: