--- Comment #4 from jsm28 at gcc dot gnu dot org 2006-09-30 16:20 ---
Working on a fix. In view of legitimate uses for this in conjunction with GNU
extensions, such as
int a[1] = { [0 ... ] = 10, [5] = 0, [1000] = 0 };
(giving an array a non-0 default value), the new warning
--- Comment #5 from jsm28 at gcc dot gnu dot org 2006-09-30 19:46 ---
Subject: Bug 24010
Author: jsm28
Date: Sat Sep 30 19:46:06 2006
New Revision: 117334
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=117334
Log:
PR c/24010
* c.opt (Woverride-init): New.
--- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-30 23:30 ---
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Status|ASSIGNED
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-03 20:06 ---
Confirmed, a regression from 2.95.3 which gave:
t.c:8: field `a' already initialized
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-03 20:13 ---
The behavior was changed by:
http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01011.html
This is valid C99 but having a warning is nice.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24010
--- Comment #3 from segher at kernel dot crashing dot org 2006-09-03 20:39
---
The overwriting behaviour is required by 6.7.8/18 and 19.
A warning is certainly in order; long ago, GCC used to warn, and
bugs were caught because of that. Not anymore...
I'll see if I can do a patch.