cpp: Now able to handle K&R style function headers #1136

git-svn-id: svn://ultimatepp.org/upp/trunk@8611 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-28 13:28:47 +00:00
parent e36bf4b25f
commit 62bb7634f6

View file

@ -843,6 +843,9 @@ void Parser::Declarator(Decl& d, const char *p)
ParamList(d);
p = lex.Pos();
Qualifier();
if(filetype == FILE_C && lex != '{' && lex != ';') // K&R style function header
while(lex != '{' && lex != t_eof)
++lex;
}
}
EatInitializers();