dear,
I'm using arm compiler version 6.
when I build some codes as bellow, the compiler recognize "__GNUC__".
Could you let me know how not to recognize it?
What should I do for it?
Hi Ben,
the detection that CMSIS uses for AC6 is as below:
/* * Arm Compiler above 6.10.1 (armclang) */#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
/*
* Arm Compiler above 6.10.1 (armclang)
*/
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
Hi Milorad,
It seems that my explanation was wrong.
I was asking why it detects "__GNUC__" even though I'm using AC6.
Could you help for it?
Thanks,
Your explanation was not wrong.
The Arm Compiler 6 defines the __GNUC__ define and the documentation says the following:
Always set. An integer that specifies the major version of thecompatible GCC version. This macro indicates that the compileraccepts GCC compatible code. The macro does not indicatewhether the -std option has enabled GNU C extensions. Fordetailed Arm Compiler for Embedded version information, use the__ARMCOMPILER_VERSION macro.
Always set. An integer that specifies the major version of the
compatible GCC version. This macro indicates that the compiler
accepts GCC compatible code. The macro does not indicate
whether the -std option has enabled GNU C extensions. For
detailed Arm Compiler for Embedded version information, use the
__ARMCOMPILER_VERSION macro.
You can find the documentation about Arm Compiler 6 here: documentation-service.arm.com/.../65f99551b145b95232658cd9
So, you have to use different way of detecting if Arm Compiler 6 is used.
Appreciate.