From: Christoph Mallon Date: Fri, 8 Aug 2008 08:33:55 +0000 (+0000) Subject: Accept (but ignore and warn about) MS-style declaration modifiers (cp_error045). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=2cb2ec7ba8235c6b0db13ce16c0bb9038ae40d8a;p=cparser Accept (but ignore and warn about) MS-style declaration modifiers (cp_error045). [r21062] --- diff --git a/parser.c b/parser.c index edab497..cbb32f6 100644 --- a/parser.c +++ b/parser.c @@ -1733,10 +1733,10 @@ static decl_modifiers_t parse_attributes(gnu_attribute_t **attributes) while(true) { switch(token.type) { - case T___attribute__: { + case T___attribute__: modifiers |= parse_gnu_attribute(attributes); break; - } + case T_asm: next_token(); expect('('); @@ -1750,6 +1750,16 @@ static decl_modifiers_t parse_attributes(gnu_attribute_t **attributes) } expect(')'); break; + + case T_cdecl: + case T__fastcall: + case T__stdcall: + case T___thiscall: + /* TODO record modifier */ + warningf(HERE, "Ignoring declaration modifier %K", &token); + next_token(); + break; + default: goto attributes_finished; }