c++: unsigned int32_t enum promotion [PR102804]
commite580f81d22d61153564959f08d9a6d3bcc7fd386
authorJason Merrill <jason@redhat.com>
Thu, 14 Apr 2022 21:49:47 +0000 (14 17:49 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 15 Apr 2022 01:55:08 +0000 (14 21:55 -0400)
tree5bf77da86a01b4989520ba1cc78f91bd07dbdb73
parent6364a39907bd68624a30df0c8e380c40d2a646c4
c++: unsigned int32_t enum promotion [PR102804]

There's been an extension for a long time to allow applying 'unsigned' to an
int typedef, but that was confusing the integer promotion code.  Fixed by
forgetting about the typedef in that case.

I'm going to make this an unconditional pedwarn in stage 1.

PR c++/102804

gcc/cp/ChangeLog:

* decl.cc (grokdeclarator): Drop typedef used with 'unsigned'.

gcc/testsuite/ChangeLog:

* g++.dg/ext/unsigned-typedef1.C: New test.
gcc/cp/decl.cc
gcc/testsuite/g++.dg/ext/unsigned-typedef1.C [new file with mode: 0644]