Skip "extern" in type definitions.

This makes supporting gcc >= 10 easier in GNU Mes.

* cc_types.c (type_name): Skip "extern".
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2021-05-02 15:46:04 +02:00
parent d80d8a652b
commit d223581d4e
1 changed files with 7 additions and 0 deletions

View File

@ -261,6 +261,13 @@ struct type* type_name()
struct type* ret;
require(NULL != global_token, "Recieved EOF instead of type name\n");
if(match("extern", global_token->s))
{
global_token = global_token->next;
require(NULL != global_token, "unfinished type definition in extern\n");
}
if(match("struct", global_token->s))
{
global_token = global_token->next;