aboutsummaryrefslogtreecommitdiff
path: root/pycparser/c_parser.py
diff options
context:
space:
mode:
authoreli.bendersky <devnull@localhost>2011-02-10 07:55:00 +0200
committereli.bendersky <devnull@localhost>2011-02-10 07:55:00 +0200
commitdce29a0efd8aa80cbaf1abdd576a64235798c33f (patch)
tree9150aa779c7593c813cbf60aca3a1c75b8a35a25 /pycparser/c_parser.py
parent697ecc5cc6a2be281edb41c591e8429a224dd8f3 (diff)
downloadpycparser-dce29a0efd8aa80cbaf1abdd576a64235798c33f.tar.gz
some fixes to previous commit + test
Diffstat (limited to 'pycparser/c_parser.py')
-rw-r--r--pycparser/c_parser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py
index 26ac3e4..b41a4eb 100644
--- a/pycparser/c_parser.py
+++ b/pycparser/c_parser.py
@@ -682,8 +682,11 @@ class CParser(PLYParser):
type=node,
init=None,
bitsize=None,
- coord=self._coord(p.lineno(2)))
+ coord=self._coord(p.lineno(3)))
decls.append(decl)
+ else:
+ self._parse_error("Anonymous field of invalid type",
+ self._coord(p.lineno(3)))
p[0] = decls