4 ms·
2.x - 9 years 3.x - 4 years 4.x - 10 years Honestly, if nothing else, I hated seeing all the #if defined __GNUC__ && (__GNUC__ > 4 ||
by klodolph 7y ago
2.x - 9 years
3.x - 4 years
4.x - 10 years
Honestly, if nothing else, I hated seeing all the
#if defined __GNUC__ &&
(__GNUC__ > 4 ||
__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
- wahern 7y agoFortunately these days you're supposed to use __has_attribute, __has_extension, and __has_builtin. But I'm not sure if, overall, things have gotten better. For example, overly eager diagnostic warnings have come at the cost of an increased need to disable diagnostics--perfectly standard-compliant code, not to mention widely supported extensions, will often trigger diagnostics with -Wall. You can disable those inline (and I try, because good luck trying to figure out what's the equivalent of CFLAGS in the build pipeline du jour, or simply expecting the user to figure it out), but they often have different names in different compilers and sometimes you have to resort to version guards to maintain a diagnostic-free build out-of-the-box. Also, the default compiler on RHEL7 is GCC 4.8, which lacks __has_attribute and friends, among other things. EOL for RHEL7 is 2024! And __has_builtin didn't even come around until GCC 10, and didn't work reliably prior to clang 11.
- loeg 7y ago4.x ran for nearly 12 years actually! April 2005 to 4.9.4 in December 2016. The 4.3.0 release was significant for at least two reasons: 1. True C99 "inline" support 2. Switch to the GPL3