diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-18 21:59:00 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-08-18 21:59:00 +0200 |
commit | bdcf20485487a685b0b21230d2455f992793c272 (patch) | |
tree | 5cdaf23b5cf08aa6a45908b5866b1ce02a3e15bf /evaluate.c | |
parent | aa6ede3b4d9de68b071481be22071fc4d5dff282 (diff) | |
parent | 437aaeabe6f148825c1e7abd36a6a98b5b2244ae (diff) | |
download | sparse-bdcf20485487a685b0b21230d2455f992793c272.tar.gz |
Merge branch 'past-deep'
* conditionalize warning "advancing past deep designator"
Diffstat (limited to 'evaluate.c')
-rw-r--r-- | evaluate.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2616,7 +2616,7 @@ static void handle_list_initializer(struct expression *expr, int class, struct symbol *ctype, unsigned long mods) { struct expression *e, *last = NULL, *top = NULL, *next; - int jumped = 0; + int jumped = 0; // has the last designator multiple levels? if (expr->zero_init) free_ptr_list(&expr->expr_list); @@ -2649,7 +2649,7 @@ static void handle_list_initializer(struct expression *expr, ctype->ident ? ": " : "", get_type_name(struct_sym->type), show_ident(struct_sym->ident)); - if (jumped) { + if (jumped && Wpast_deep_designator) { warning(e->pos, "advancing past deep designator"); jumped = 0; } |