From 62bb7634f6c7243d1f2d5bc03b94fce90131ebe3 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 28 Jun 2015 13:28:47 +0000 Subject: [PATCH] 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 --- uppsrc/CppBase/Parser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uppsrc/CppBase/Parser.cpp b/uppsrc/CppBase/Parser.cpp index 7e9c277c4..40e1b8ee2 100644 --- a/uppsrc/CppBase/Parser.cpp +++ b/uppsrc/CppBase/Parser.cpp @@ -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();