Le 16/01/12 17:24, Ben Bacarisse a écrit :
>> if (t != ';'&& t != ID&& t != '*' ) {
>> // "missing semicolon after structure declaration\n"
>> error(StrTab[474]);
>> }
>> "ID" means any identifier. So, I thought that after a structure
>> declaration you can write a semicolon, an identifier or a "*"
>> to define a pointer to that type of struct.
>>
>> You see the bug?
>>
>> I have now changed that to:
>> if (t != ';'&& t != ID&& t != '*'
>> && t != CONST&& t != VOLATILE ) {
>> }
>>
>> Are there any other followup that I am missing?
>
> Yes, '(' and 'restrict'.
>
> <snip>
restrict is not allowed as far as gcc (with -std=c99)
is concerned. And in any case should be "* restrict"
isn't it?
What the ('( is concerned you mean:
struct foo { int a;} (*fn)(void);
That one?