https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105020
Bug ID: 105020
Summary: #pragma GCC diagnostic ignored "-Wmultichar" doesn't
work
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: andre.schackier at gmail dot com
Target Milestone: ---
Created attachment 52664
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52664&action=edit
The used source code
Give the following source code:
```cpp
#pragma GCC diagnostic ignored "-Wmultichar"
#pragma GCC diagnostic ignored "-Woverflow"
void EnterCharacter(unsigned short);
int main() { EnterCharacter('\0xFF'); }
```
Produces the following output:
```
source>:6:29: warning: multi-character character constant [-Wmultichar]
6 | int main() { EnterCharacter('\0xFF'); }
| ^~~~~~~
```
It seems all version from gcc-4.6.4 to gcc-11.2 are affected including trunk.
[godbolt link](https://godbolt.org/z/PTWPModPT)