2023-09-12 06:46 AM
Hello,
is it ok to use the __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ marcros, to check the toolchain version, at compile time?
I am using the following toolchain version:
In this case and the macros have the following values:
__GNUC__ = 10
__GNUC_MINOR__ = 3
__GNUC_PATCHLEVEL__ = 1
I have noticed that the first two values are the same of the toolchain (10.3).
Thank you,
Carlo
Solved! Go to Solution.
2023-09-12 07:16 AM
Yes, you can use those macros however you want in your program. They are often used to output the compiler settings used to generate the program.
2023-09-12 07:16 AM
Yes, you can use those macros however you want in your program. They are often used to output the compiler settings used to generate the program.
2023-09-12 07:30 AM
Thank you,
for the very quick response!