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

error: extended character ² is not valid in an identifier

Hello,

The ARM GNU toolchain does not like at all "extended characters" (like '²' or '℃') that are completely OK with other GNU toolcahins (for ARM or other architectures).

The problem lies at the C preprocessor 'cpp'...

How can that be?!

Thank you.

Parents
  • Hi there,

    I've managed to replicate your findings across releases: https://godbolt.org/z/4b85MW441 using `-pedantic -std=c2x` for C and `-pedantic -std=c++23` for C++. Interestingly, C fails from GCC13, wheareas C++ fails from GCC12: although with may just be a symptom of the C23/C++23 suppoert being Work In Progress across all these compiler releases.

    Are you using `-pedantic`? It seems to work if `-pedantic` is removed. Otherwise, what other command line options are you using?

    I don't know if this is expected behaviour for `-pedantic`, so I've raised https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112702 . Someone there will know if this is expected or not.

    You're right, seems to affect GCC regardless of the target backend being used (arm, aarch64, x86, etc.).

    Thanks,
    Stam

Reply
  • Hi there,

    I've managed to replicate your findings across releases: https://godbolt.org/z/4b85MW441 using `-pedantic -std=c2x` for C and `-pedantic -std=c++23` for C++. Interestingly, C fails from GCC13, wheareas C++ fails from GCC12: although with may just be a symptom of the C23/C++23 suppoert being Work In Progress across all these compiler releases.

    Are you using `-pedantic`? It seems to work if `-pedantic` is removed. Otherwise, what other command line options are you using?

    I don't know if this is expected behaviour for `-pedantic`, so I've raised https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112702 . Someone there will know if this is expected or not.

    You're right, seems to affect GCC regardless of the target backend being used (arm, aarch64, x86, etc.).

    Thanks,
    Stam

Children
No data