Added handling of "short int" type specifier
Just consumes and discards the "int" token and treats as if it was only a "short".
This commit is contained in:
parent
3979f563aa
commit
7b43483f68
|
@ -8,8 +8,13 @@ long int e;
|
||||||
unsigned long f;
|
unsigned long f;
|
||||||
unsigned long int g;
|
unsigned long int g;
|
||||||
|
|
||||||
volatile int i;
|
short h;
|
||||||
int volatile static j;
|
short int i;
|
||||||
|
unsigned short j;
|
||||||
|
unsigned short int k;
|
||||||
|
|
||||||
|
volatile int l;
|
||||||
|
int volatile static m;
|
||||||
|
|
||||||
const int x;
|
const int x;
|
||||||
long const y;
|
long const y;
|
||||||
|
|
4
type.c
4
type.c
|
@ -464,8 +464,8 @@ int TypeParseFront(struct ParseState *Parser, struct ValueType **Typ,
|
||||||
Token = LexGetToken(Parser, &LexerValue, true);
|
Token = LexGetToken(Parser, &LexerValue, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle long with trailing int by consuming and ignoring the int */
|
/* handle long or short with trailing int by consuming and ignoring the int */
|
||||||
if (Token == TokenLongType) {
|
if (Token == TokenLongType || Token == TokenShortType) {
|
||||||
enum LexToken FollowToken = LexGetToken(Parser, NULL, false);
|
enum LexToken FollowToken = LexGetToken(Parser, NULL, false);
|
||||||
if (FollowToken == TokenIntType) {
|
if (FollowToken == TokenIntType) {
|
||||||
LexGetToken(Parser, NULL, true);
|
LexGetToken(Parser, NULL, true);
|
||||||
|
|
Loading…
Reference in a new issue