public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60257] New: Incorrect column number and confusing message in -Woverride-init
@ 2014-02-18  5:53 chengniansun at gmail dot com
  2014-02-18  6:43 ` [Bug c/60257] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chengniansun at gmail dot com @ 2014-02-18  5:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60257
           Summary: Incorrect column number and confusing message in
                    -Woverride-init
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com

I have two questions regarding -Woverride-init, 
1) the column number seems not right
        always starting from the beginning of the statement. 
2) the second message is confusing to me.
        is it trying to pinpoint the location where the field is first
initialized, similar to what Clang does?  


$: cat s.c
struct S {int i; int j;};
struct S s = {
  .j=4, .i=5, .i=6,
};
$: gcc-trunk -std=c99 -c -Woverride-init s.c
s.c:3:3: warning: initialized field overwritten [-Woverride-init]
   .j=4, .i=5, .i=6,
   ^
s.c:3:3: warning: (near initialization for ‘s.i’) [-Woverride-init]

$: clang-trunk -std=c99 -Winitializer-overrides -c s.c
s.c:3:18: warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
  .j=4, .i=5, .i=6,
                 ^
s.c:3:12: note: previous initialization is here
  .j=4, .i=5, .i=6,
           ^
1 warning generated.
>From gcc-bugs-return-444005-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Feb 18 06:32:26 2014
Return-Path: <gcc-bugs-return-444005-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28121 invoked by alias); 18 Feb 2014 06:32:25 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 28078 invoked by uid 48); 18 Feb 2014 06:32:20 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60250] [4.9 Regression] [c++1y] ICE using lambda for array size
Date: Tue, 18 Feb 2014 06:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-60250-4-Lpfd3QnlxX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60250-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60250-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg01762.txt.bz2
Content-length: 636

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`250

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-18
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r200279.


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

end of thread, other threads:[~2014-05-01  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18  5:53 [Bug c/60257] New: Incorrect column number and confusing message in -Woverride-init chengniansun at gmail dot com
2014-02-18  6:43 ` [Bug c/60257] " mpolacek at gcc dot gnu.org
2014-04-25 19:25 ` mpolacek at gcc dot gnu.org
2014-05-01  7:35 ` mpolacek at gcc dot gnu.org
2014-05-01  7:36 ` mpolacek at gcc dot gnu.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).