From 5720c77acde1b2348f3c3d08e3a27cf624be1323 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 9 Dec 2018 10:34:29 +0100 Subject: sourcescanner: Allow empty declarations. Fixes #216 As far as I see these are not valid C and only allowed in C++11. But they do occur in the wild (mingw headers) so let's try to handle them. --- giscanner/scannerparser.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'giscanner/scannerparser.y') diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y index 72c17ec3..299910da 100644 --- a/giscanner/scannerparser.y +++ b/giscanner/scannerparser.y @@ -791,6 +791,9 @@ declaration } ; +empty_declaration + : ';' + declaration_specifiers : storage_class_specifier declaration_specifiers { @@ -1459,6 +1462,7 @@ translation_unit external_declaration : function_definition | declaration + | empty_declaration | macro ; -- cgit v1.2.1