aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inline.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2022-06-09 11:11:09 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2022-06-09 11:11:09 +0200
commit9212270048c3bd23f56c20a83d4f89b870b2b26e (patch)
tree3785b539c4787497f38770cd6fbc3b56afe226ba /inline.c
parent29083a76efa600b02d30f32d0393ae53e37887f8 (diff)
parent53e04b3b780bbcf2dd3eb7990c17414742bbfef9 (diff)
downloadsparse-dev-9212270048c3bd23f56c20a83d4f89b870b2b26e.tar.gz
Merge branches 'cgcc-dash-x' and 'fixes'
* cgcc: do not die on '-x assembler' * fix crash when inlining casts of erroneous expressions - allow show_token() on TOKEN_ZERO_IDENT
Diffstat (limited to 'inline.c')
-rw-r--r--inline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/inline.c b/inline.c
index eceef8ba..0097e4bf 100644
--- a/inline.c
+++ b/inline.c
@@ -155,6 +155,8 @@ static struct expression * copy_expression(struct expression *expr)
/* Cast/sizeof/__alignof__ */
case EXPR_CAST:
+ if (!expr->cast_expression)
+ return NULL;
if (expr->cast_expression->type == EXPR_INITIALIZER) {
struct expression *cast = expr->cast_expression;
struct symbol *sym = expr->cast_type;