diff --git a/c-tests/types.c b/c-tests/types.c index eda768f..375bc0f 100644 --- a/c-tests/types.c +++ b/c-tests/types.c @@ -8,8 +8,13 @@ long int e; unsigned long f; unsigned long int g; -volatile int i; -int volatile static j; +short h; +short int i; +unsigned short j; +unsigned short int k; + +volatile int l; +int volatile static m; const int x; long const y; diff --git a/type.c b/type.c index a2af8d2..f2bcfc4 100644 --- a/type.c +++ b/type.c @@ -464,8 +464,8 @@ int TypeParseFront(struct ParseState *Parser, struct ValueType **Typ, Token = LexGetToken(Parser, &LexerValue, true); } - /* handle long with trailing int by consuming and ignoring the int */ - if (Token == TokenLongType) { + /* handle long or short with trailing int by consuming and ignoring the int */ + if (Token == TokenLongType || Token == TokenShortType) { enum LexToken FollowToken = LexGetToken(Parser, NULL, false); if (FollowToken == TokenIntType) { LexGetToken(Parser, NULL, true);