File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ static struct expression * copy_expression(struct expression *expr)
155155
156156 /* Cast/sizeof/__alignof__ */
157157 case EXPR_CAST :
158+ if (!expr -> cast_expression )
159+ return NULL ;
158160 if (expr -> cast_expression -> type == EXPR_INITIALIZER ) {
159161 struct expression * cast = expr -> cast_expression ;
160162 struct symbol * sym = expr -> cast_type ;
Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ const char *show_token(const struct token *token)
201201 return "end-of-input" ;
202202
203203 case TOKEN_IDENT :
204+ case TOKEN_ZERO_IDENT :
204205 return show_ident (token -> ident );
205206
206207 case TOKEN_NUMBER :
@@ -259,6 +260,7 @@ const char *quote_token(const struct token *token)
259260 return "syntax error" ;
260261
261262 case TOKEN_IDENT :
263+ case TOKEN_ZERO_IDENT :
262264 return show_ident (token -> ident );
263265
264266 case TOKEN_NUMBER :
Original file line number Diff line number Diff line change 1+ inline void fun (int x )
2+ {
3+ (typeof (@)) x ;
4+ }
5+
6+ void foo (void )
7+ {
8+ fun ;
9+ }
10+
11+ /*
12+ * check-name: bug-bad-token
13+ * check-exit-value: 0
14+ * check-error-ignore
15+ */
You can’t perform that action at this time.
0 commit comments