Elektrine lite

← Feed

@raspberriesareyummy@lemmy.world

Post #2292244

2026-05-09 16:21 UTC

Nah, I would absolutely want my compiler to error out hard on characters that are not allowed per the standard.

Replies (1)

  • @mkwt@lemmy.world 2026-05-10 16:07

    In C and C++, the source character set is implementation defined. This means that each compiler sets its own rules about what characters are accepted. For example compilers could choose to accept ASCII or EBCDIC or Unicode, or some combination, etc. So the ISO standard will say that ; character is the end of statement punctuation. But it is up to the compiler to say which character(s) or code point(s) represent the ISO ;. The ISO standards also require compilers to define a separate execution character set to specify values that can be stored in char and used with the string library functions. The execution character set doesn’t have to be the same as the source character set.

    Open ##2348113