Issue 86900
Summary clang++ does not comply with C++ standard normalization rules
Labels clang
Assignees
Reporter fmayer
    https://timsong-cpp.github.io/cppwp/lex.name#1: The program is ill-formed if an identifier does not conform to Normalization Form C as specified in the Unicode Standard.

clang++ accepts without warning a program that uses a non-canonical umlaut

```
int ü() {
  return 1;
}

int main() {
  return ü();
}
```

hex dump of the program

```
00000000: 696e 7420 c3bc 2829 207b 0a20 2072 6574  int ..() {.  ret
00000010: 7572 6e20 313b 0a7d 0a0a 696e 7420 6d61  urn 1;.}..int ma
00000020: 696e 2829 207b 0a20 2072 6574 7572 6e20  in() {.  return 
00000030: 75cc 8828 293b 0a7d 0a                   u..();.}.
```

This particular program confusingly fails with 

```
test.cpp:6:10: error: use of undeclared identifier 'ü'
  return ü();
         ^
1 error generated.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to