Closed PerilousApricot closed 8 years ago
This blocks #83
It's really just a problem in the short term. Since it's now part of the standard everyone will support it next year. I'd vote to leave things as they are since it's automatically fixed with time.
Not quite:
- You can't compile at all with -std=anything, so we can't just wait for attrition
- Older distros won't update their compilers to new major revisions, just point bug fixes, so the problem won't just evaporate (centos-6's EOL is 2022, IIRC)
It's dark in this basement.
They aren't used a lot but there's an elegance to them that naming them destroys. I've used anonymous unions for decades (C, Fortran, Cobol, Pascal) that's why I'm surprised they are a recent addition to the standard. Is there any way to tweak the build settings for the old compilers?
I assume this would also mean we couldn't use C11 atomic types due to lack of support in pre-C11 compilers.
Tweaking the compiler settings was the 3rd thing I listed :). Though, I'd really prefer to stick to standard C. It may be less elegant, but supporting a matrix of compilers-specific workarounds is something I'm less in favor of.
And yes, the compiler support matrix crimps using builtin C11 atomic intrinsics.
It's dark in this basement.
Fixed by #86
Anonymous unions like
Don't exist in standard C until C11 and compiler support for that particular C11 feature in GCC is past most existing distros, so adding
-std=c99
or-std=c11
breaks things. GCC supports the extension-fms-extensions
to re-enable the code in standards-compliant mode.We should either: