Commit be443f0b authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Better error for casts (#48)

parent db608ca8
...@@ -229,6 +229,8 @@ def p_typecast(s): ...@@ -229,6 +229,8 @@ def p_typecast(s):
pos = s.position() pos = s.position()
s.next() s.next()
base_type = p_c_base_type(s) base_type = p_c_base_type(s)
if base_type.name is None:
s.error("Unknown type")
declarator = p_c_declarator(s, empty = 1) declarator = p_c_declarator(s, empty = 1)
if s.sy == '?': if s.sy == '?':
s.next() s.next()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment