This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/86709] New: 'short type-name' is invalid
- From: "zhonghao at pku dot org.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jul 2018 23:28:23 +0000
- Subject: [Bug c/86709] New: 'short type-name' is invalid
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86709
Bug ID: 86709
Summary: 'short type-name' is invalid
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: zhonghao at pku dot org.cn
Target Milestone: ---
gcc allows ``short'' to appear with a typedef'd char:
typedef unsigned char __u8;
__u8 short slot_tablelen;
is accepted, but
unsigned char short slot_tablelen;
is not, which doesn't make sense to me. (In C99, short is
not allowed with any typedef'd name -- I'm not sure why it's
allowed in gcc.)
My gcc is gcc version 9.0.0 20180715 (experimental) (GCC)
I tried clang++. It rejects both code samples:
error: 'short type-name' is invalid
__u8 short slot_tablelen;
^
1 error generated.
error: 'short char' is invalid
unsigned char short slot_tablelen;
^
1 error generated.