aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/evaluate.c b/evaluate.c
index c1ef348a..cfbb6ada 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -2253,6 +2253,9 @@ static struct symbol *evaluate_sizeof(struct expression *expr)
size = bits_in_char;
}
+ if (has_flexible_array(type) && Wflexible_array_sizeof)
+ warning(expr->pos, "using sizeof on a flexible structure");
+
if (is_array_type(type) && size < 0) { // VLA, 1-dimension only
struct expression *base, *size;
struct symbol *base_type;