- **** Documentation:
- https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
- **** Symbols to use:
- #define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
- …
- /* Test for GCC > 3.2.0 */
- #if GCC_VERSION > 30200
- **** How can I find out which gcc version I use ?
- $ gcc -dM -E - < /dev/null | egrep GNUC
- #define __GNUC__ 10
- #define __GNUC_PATCHLEVEL__ 0
- #define __GNUC_STDC_INLINE__ 1
- #define __GNUC_MINOR__ 2
Test for gcc version
Posted by Anonymous on Tue 31st Aug 2021 16:19
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.