public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67777] New: unsigned wchar_t and signed wchar_t should cause compiler errors but do not.
@ 2015-09-30 2:33 TrevorJamesHickey at gmail dot com
2021-08-04 21:52 ` [Bug c++/67777] " pinskia at gcc dot gnu.org
2021-08-05 11:24 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: TrevorJamesHickey at gmail dot com @ 2015-09-30 2:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67777
Bug ID: 67777
Summary: unsigned wchar_t and signed wchar_t should cause
compiler errors but do not.
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: TrevorJamesHickey at gmail dot com
Target Milestone: ---
Is the following program valid C++?
void f(unsigned wchar_t){}
int main(){}
It compiles without errors.
The standard specifies that:
"signed or unsigned can be combined with char, long, short, or int."
wchar_t is a distinct type, but the standard makes no mention of it being able
to be qualified with signed or unsigned.
"Type wchar_t shall have the same size, signedness, and alignment requirements
(3.11) as one of the other integral types, called its underlying type."
Why can we add signed/unsigned qualifiers to wchar_t?
Is this by design? Can I get a warning about this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/67777] unsigned wchar_t and signed wchar_t should cause compiler errors but do not.
2015-09-30 2:33 [Bug c++/67777] New: unsigned wchar_t and signed wchar_t should cause compiler errors but do not TrevorJamesHickey at gmail dot com
@ 2021-08-04 21:52 ` pinskia at gcc dot gnu.org
2021-08-05 11:24 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-04 21:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67777
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Resolution|--- |FIXED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=84701
Status|UNCONFIRMED |RESOLVED
Target Milestone|--- |9.0
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This changed in GCC9+ to always reject. Most likely by the patch which fixed
PR 84701.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/67777] unsigned wchar_t and signed wchar_t should cause compiler errors but do not.
2015-09-30 2:33 [Bug c++/67777] New: unsigned wchar_t and signed wchar_t should cause compiler errors but do not TrevorJamesHickey at gmail dot com
2021-08-04 21:52 ` [Bug c++/67777] " pinskia at gcc dot gnu.org
@ 2021-08-05 11:24 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-05 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67777
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, it was fixed by r259780
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-05 11:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30 2:33 [Bug c++/67777] New: unsigned wchar_t and signed wchar_t should cause compiler errors but do not TrevorJamesHickey at gmail dot com
2021-08-04 21:52 ` [Bug c++/67777] " pinskia at gcc dot gnu.org
2021-08-05 11:24 ` redi 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).