-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Autoconf: Use -std=gnu99 if supported #5600
Conversation
BTW my testing included on super, which is where I stumbled upon the problem (it has gcc 4.4.7). I will test a few more (on top of build bots compilers and versions). |
clang 16.0.0 "(clang-1600.0.26.4)" new warnings with this (but does accept the gnu99 option, and builds fine)
|
Just a note
That "ISO C89" test seems to be something built-in to autoconf, nothing added to makefiles. |
I think this PR is not ready. Let's merge #5599 first, then discuss here. Anonymous structs/unions is a useful feature, but I've been avoiding it in this tree so far. What uses of it do we currently have? |
"dyna_salt_t" was used as struct name, which is backwards. Then "dyna_salt" was used as typedef name, member name and variable name which was very confusing. Now using dyna_salt_s, dyna_salt_t and dyna_salt.
Using -std=c99 breaks anonymous structs/unions with gcc-4 (only). Closes openwall#5595
We've had them for over a decade. |
I'm not quite sure about dyna_salt: It's either that the bitfield is anonymous, or that the allocation unit is |
From a quick look at wpapcap2john.h it seems the bitfields are not anonymous, but they do use |
Looking at the uses of it, maybe not, in that case. We could probably use |
What is the (specific) reason for us to switch to C99 again? Perhaps we could enable whatever feature is needed - but that would likely be even less portable. Maybe it's mostly things like Also, we could obviously rewrite any such code, but for eg. princeprocessor and mbedtls that would make syncing with upstream much harder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I don't mind gnu99
for now.
This broke build (or rather the final linking) on our "well" as follows:
I've tried adding |
We first ensure it's supported by the compiler, so this "can't" break anything [famous last words, right?].
Also includes a commit that refactors confusing struct, union and member names for dyna_salt.
If this is merged, it should be after merging #5599 or that one will be included too.Now rebased.