This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

__GNUC__ when using compiler 6

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?

Parents
  • Hi Ben,

    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 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.

Reply
  • Hi Ben,

    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 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.

Children