diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-09 10:34:29 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-09 10:41:26 +0100 |
commit | 5720c77acde1b2348f3c3d08e3a27cf624be1323 (patch) | |
tree | aed9e8b2af27d70234edb5c2fb26ab6feb1760ca /giscanner | |
parent | ee5a93788618d85e4be1b4c96cb8ba3daf0b6173 (diff) | |
download | gobject-introspection-5720c77acde1b2348f3c3d08e3a27cf624be1323.tar.gz |
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.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/scannerparser.y | 4 |
1 files changed, 4 insertions, 0 deletions
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 ; |