changelog shortlog tags browse all files raw

changeset: Better error for casts (#48)

changeset 1155: 18c66117c5e8
parent 1154:93af50c93052
child 1156:02eb1bab8afa
author: Dag Sverre Seljebotn <dagss@student.matnat.uio.no>
date: Thu Sep 18 11:43:41 2008 +0200 (3 months ago)
files: Cython/Compiler/Parsing.py
description: Better error for casts (#48)
--- a/Cython/Compiler/Parsing.py	Wed Sep 17 11:56:30 2008 +0200
+++ b/Cython/Compiler/Parsing.py	Thu Sep 18 11:43:41 2008 +0200
@@ -229,6 +229,8 @@ def p_typecast(s):
     pos = s.position()
     s.next()
     base_type = p_c_base_type(s)
+    if base_type.name is None:
+        s.error("Unknown type")
     declarator = p_c_declarator(s, empty = 1)
     if s.sy == '?':
         s.next()