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.)
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
redhat 7.1, x86
Responsible-Changed-Why: Claiming responsibility for this bug. The fix is trivial,
but doing it properly does involve writing a collection
of testcases for all the valid and invalid uses of type
State-Changed-Why: Confirmed as a bug in current 3.1 CVS. This case will
give a warning with -pedantic; there are a lot of cases
where warnings conditional on -pedantic ought to be
unconditional warnings or errors, and since this is a case
of nonsense code it ought to be an unconditional error.
State-Changed-Why: Fixed for 3.3.
Date: 21 Aug 2002 16:31:37 -0000
Module name: gcc
Changes by: email@example.com 2002-08-21 09:31:37
gcc : ChangeLog c-decl.c
gcc/testsuite : ChangeLog
* c-decl.c (grokdeclarator): Make invalid combinations with long,
short, signed or unsigned into hard errors. Fixes PR c/4319.
Also make duplicate modifiers such as "short short" into hard
* gcc.dg/typespec-1.c: New test.