Issue |
137471
|
Summary |
"multi-character character constant" warning is not displayed for 4-character constants
|
Labels |
new issue
|
Assignees |
|
Reporter |
strimo378
|
Hi all,
I found an inconsistency in the warning of multi-character constants. In the following code, the first 2 cases produce a warning while the third one does not:
```
int x2 = '\x12\x34';
int x3 = '\x12\x34\x56';
int x4 = '\x12\x34\x56\x78';
```
This code outputs
```
<source>:3:10: warning: multi-character character constant [-Wmultichar]
3 | int x2 = '\x12\x34';
| ^
<source>:4:10: warning: multi-character character constant [-Wmultichar]
4 | int x3 = '\x12\x34\x56';
```
See compiler explorer: https://godbolt.org/z/Ehrzjqjxh
gcc is showing 3 warnings.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs