public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105020] New: #pragma GCC diagnostic ignored "-Wmultichar" doesn't work
@ 2022-03-22 17:21 andre.schackier at gmail dot com
2022-03-22 17:24 ` [Bug c++/105020] " pinskia at gcc dot gnu.org
2022-03-23 0:58 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: andre.schackier at gmail dot com @ 2022-03-22 17:21 UTC (permalink / raw)
To: gcc-bugs
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105020] #pragma GCC diagnostic ignored "-Wmultichar" doesn't work
2022-03-22 17:21 [Bug c++/105020] New: #pragma GCC diagnostic ignored "-Wmultichar" doesn't work andre.schackier at gmail dot com
@ 2022-03-22 17:24 ` pinskia at gcc dot gnu.org
2022-03-23 0:58 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-22 17:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105020
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There might be a dup of this bug but basically the issue is the c++ does lexing
up front and the pragma is handled in frontend after lexing.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105020] #pragma GCC diagnostic ignored "-Wmultichar" doesn't work
2022-03-22 17:21 [Bug c++/105020] New: #pragma GCC diagnostic ignored "-Wmultichar" doesn't work andre.schackier at gmail dot com
2022-03-22 17:24 ` [Bug c++/105020] " pinskia at gcc dot gnu.org
@ 2022-03-23 0:58 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-23 0:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105020
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 53431 (well it is a dup of bug 100891 which was marked as a dup of
that other bug).
*** This bug has been marked as a duplicate of bug 53431 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-23 0:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 17:21 [Bug c++/105020] New: #pragma GCC diagnostic ignored "-Wmultichar" doesn't work andre.schackier at gmail dot com
2022-03-22 17:24 ` [Bug c++/105020] " pinskia at gcc dot gnu.org
2022-03-23 0:58 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).