Thread: GCC not following C99+?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078

    GCC not following C99+?

    Please, check my interpretation:

    ISO 9989:1999 and later says in topic 5.2.1.2:

    "An identifier, comment, string literal, character constant, or header name shall consist of a sequence of valid multibyte characters."

    And Annex D (normative) lists the "valid multibyte characters"

    This way, identifiers like "nš" or "eⁿ" are valid... and GCC says in its documentation of -fextended-identifiers option:

    "Accept universal character names in identifiers. This option is enabled by default for C99 (and later C standard versions) and C++."

    But such identifiers names aren't accepted! At least, I got a compilation error... This, doesn't compile:

    Code:
    int nš=3;
    The only "extended" character accepted is "$", but it isn't normative (not in Annex D).

    Any thoughts?

    PS: By the way... clang and Visual C++ 19 (when source-code is encoded in UTF-16LE) follows annex D!
    Last edited by flp1969; 08-16-2020 at 04:44 AM.

Popular pages Recent additions subscribe to a feed

Tags for this Thread