public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36489]  New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
@ 2008-06-10 16:26 smeuuh at gmail dot com
  2008-12-28  1:21 ` [Bug c/36489] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: smeuuh at gmail dot com @ 2008-06-10 16:26 UTC (permalink / raw)
  To: gcc-bugs

Hi,
This code :
int t[10][10] = {
                [1][2] = 1,
                [1][3] = 2
        };
warns with "initialized field overwritten" under -Wextra with gcc 4.3.0,
although it's perfectly valid.
Antoine Levitt


-- 
           Summary: Warning "initialized field overwritten" wrongly triggers
                    with multidimensional arrays
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: smeuuh at gmail dot com
 GCC build triplet: i386-pc-linux
  GCC host triplet: i386-pc-linux
GCC target triplet: i386-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3/4.4 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
@ 2008-12-28  1:21 ` pinskia at gcc dot gnu dot org
  2008-12-29 16:42 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-28  1:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-12-28 01:19 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
      Known to fail|                            |4.3.0 4.4.0 4.3.2 4.3.3
      Known to work|                            |4.1.1 4.0.2
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-28 01:19:04
               date|                            |
            Summary|Warning "initialized field  |[4.3/4.4 Regression] Warning
                   |overwritten" wrongly        |"initialized field
                   |triggers with               |overwritten" wrongly
                   |multidimensional arrays     |triggers with
                   |                            |multidimensional arrays
   Target Milestone|---                         |4.3.3
            Version|unknown                     |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3/4.4 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
  2008-12-28  1:21 ` [Bug c/36489] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-12-29 16:42 ` jakub at gcc dot gnu dot org
  2008-12-29 21:51 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-29 16:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-12-28 01:19:04         |2008-12-29 16:40:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3/4.4 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
  2008-12-28  1:21 ` [Bug c/36489] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
  2008-12-29 16:42 ` jakub at gcc dot gnu dot org
@ 2008-12-29 21:51 ` rguenth at gcc dot gnu dot org
  2009-01-01 19:42 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-29 21:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3/4.4 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
                   ` (2 preceding siblings ...)
  2008-12-29 21:51 ` rguenth at gcc dot gnu dot org
@ 2009-01-01 19:42 ` jakub at gcc dot gnu dot org
  2009-01-01 19:46 ` [Bug c/36489] [4.3 " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-01 19:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-01-01 19:41 -------
Subject: Bug 36489

Author: jakub
Date: Thu Jan  1 19:40:03 2009
New Revision: 142998

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142998
Log:
        PR c/36489
        * c-typeck.c (add_pending_init): Add IMPLICIT argument.  Only
        warn about overwriting initializer with side-effects or
        -Woverride-init if !IMPLICIT.
        (output_init_element): Likewise.  Pass IMPLICIT down to
        add_pending_init.
        (process_init_element): Add IMPLICIT argument.  Pass it down
        to output_init_element.
        (push_init_element, pop_init_level, set_designator): Adjust
        process_init_element callers.
        (set_nonincremental_init, set_nonincremental_init_from_string):
        Adjust add_pending_init callers.
        (output_pending_init_elements): Adjust output_init_element callers.
        * c-tree.h (process_init_element): Adjust prototype.
        * c-parser.c (c_parser_initelt, c_parser_initval): Adjust
        process_init_element callers.

        * gcc.dg/pr36489.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr36489.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-parser.c
    trunk/gcc/c-tree.h
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
                   ` (3 preceding siblings ...)
  2009-01-01 19:42 ` jakub at gcc dot gnu dot org
@ 2009-01-01 19:46 ` jakub at gcc dot gnu dot org
  2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-01 19:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-01-01 19:44 -------
Fixed on the trunk so far.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.3.0 4.4.0 4.3.2 4.3.3     |4.3.0 4.3.2 4.3.3
      Known to work|4.1.1 4.0.2                 |4.1.1 4.0.2 4.4.0
            Summary|[4.3/4.4 Regression] Warning|[4.3 Regression] Warning
                   |"initialized field          |"initialized field
                   |overwritten" wrongly        |overwritten" wrongly
                   |triggers with               |triggers with
                   |multidimensional arrays     |multidimensional arrays


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
                   ` (4 preceding siblings ...)
  2009-01-01 19:46 ` [Bug c/36489] [4.3 " jakub at gcc dot gnu dot org
@ 2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
  2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
  2010-05-22 18:31 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.3                       |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
                   ` (5 preceding siblings ...)
  2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
@ 2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
  2010-05-22 18:31 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/36489] [4.3 Regression] Warning "initialized field overwritten" wrongly triggers with multidimensional arrays
  2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
                   ` (6 preceding siblings ...)
  2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 18:31 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-05-22 18:12 -------
GCC 4.3.5 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.5                       |4.3.6


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36489


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-05-22 18:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 16:26 [Bug c/36489] New: Warning "initialized field overwritten" wrongly triggers with multidimensional arrays smeuuh at gmail dot com
2008-12-28  1:21 ` [Bug c/36489] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-12-29 16:42 ` jakub at gcc dot gnu dot org
2008-12-29 21:51 ` rguenth at gcc dot gnu dot org
2009-01-01 19:42 ` jakub at gcc dot gnu dot org
2009-01-01 19:46 ` [Bug c/36489] [4.3 " jakub at gcc dot gnu dot org
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-08-04 12:41 ` rguenth at gcc dot gnu dot org
2010-05-22 18:31 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).