]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/c-typeck.c
c-typeck.c (process_init_element): Detect excess elements in char array initializer.
[gcc.git] / gcc / c-typeck.c
index 854baf888235aa3305149a016ec5f5999f766a99..95d417e1d8d463e974a6eac7126118225314d504 100644 (file)
@@ -6478,6 +6478,8 @@ process_init_element (value)
       && TREE_CODE (TREE_TYPE (constructor_type)) == INTEGER_TYPE
       && integer_zerop (constructor_unfilled_index))
     {
+      if (constructor_stack->replacement_value)
+        error_init ("excess elements in char array initializer");
       constructor_stack->replacement_value = value;
       return;
     }
This page took 0.032484 seconds and 5 git commands to generate.