public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59292] New: Spurious warning: ‘<anonymous>’ is used uninitialized in this function
@ 2013-11-25 19:17 bluesmissionnaire at gmail dot com
  2013-11-25 22:58 ` [Bug c++/59292] " manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: bluesmissionnaire at gmail dot com @ 2013-11-25 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59292
           Summary: Spurious warning: ‘<anonymous>’ is used uninitialized
                    in this function
           Product: gcc
           Version: 4.4.7
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bluesmissionnaire at gmail dot com

Created attachment 31290
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31290&action=edit
/usr/bin/g++-4.4 -Wall -Wextra -save-temps -c -O1
anonymous_may_be_used_uninitialized.cpp

Using g++-4.4 (GCC) 4.4.7 20120313 (Red Hat 4.4.7-1)

/usr/bin/g++-4.4 -Wall -Wextra -save-temps -c -O1
anonymous_may_be_used_uninitialized.cpp

warns:

anonymous_may_be_used_uninitialized.cpp: In function ‘typename T::value_type
gccBug::getFirstElement(const T&) [with T = std::map<gccBug::VectorSubclass,
gccBug::SomeTemplatedType<gccBug::SomeEnum, unsigned int>,
std::less<gccBug::VectorSubclass>, std::allocator<std::pair<const
gccBug::VectorSubclass, gccBug::SomeTemplatedType<gccBug::SomeEnum, unsigned
int> > > >]’:
anonymous_may_be_used_uninitialized.cpp:45: warning: ‘<anonymous>’ may be used
uninitialized in this function
anonymous_may_be_used_uninitialized.cpp:45: note: ‘<anonymous>’ was declared
here

When I decrease optimization level to 0 a warning disappears.

I checked test files attached to multiple similar bugs (including
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58877 which disappeared after
upgrade from 4.4.6 to 4.4.7) but none of them generated this warning. That is
why I am creating a new bug.
Using http://gcc.godbolt.org/ I confirmed that this bug still occurs on
Ubuntu/Linaro 4.4.7-1ubuntu2 and does not occur on newer versions so at least
the code attached my serve as an addition to your regression suite.
>From gcc-bugs-return-435817-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 25 19:18:01 2013
Return-Path: <gcc-bugs-return-435817-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22967 invoked by alias); 25 Nov 2013 19:18:01 -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 22942 invoked by uid 48); 25 Nov 2013 19:17:58 -0000
From: "bluesmissionnaire at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59292] Spurious warning:=?UTF-8?Q? ‘?=<anonymous>=?UTF-8?Q?’ is used uninitialized in this function?Date: Mon, 25 Nov 2013 19:18: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.4.7
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bluesmissionnaire at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-59292-4-MzMefvbyLC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59292-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59292-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02594.txt.bz2
Content-length: 269

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

--- Comment #1 from Przemysław Strzelczak <bluesmissionnaire at gmail dot com> ---
Created attachment 31291
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31291&action=edit
corresponding source file.
>From gcc-bugs-return-435818-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 25 19:57:22 2013
Return-Path: <gcc-bugs-return-435818-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21528 invoked by alias); 25 Nov 2013 19:57:21 -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 21493 invoked by uid 48); 25 Nov 2013 19:57:18 -0000
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59113] [c++1y] ICE using auto as parameter in local function
Date: Mon, 25 Nov 2013 19:57: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: error-recovery, ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: reichelt at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-59113-4-EQe2h4cvZM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59113-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59113-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: 2013-11/txt/msg02595.txt.bz2
Content-length: 447

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY113

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Fixed by Adam's patch.


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

end of thread, other threads:[~2013-11-25 22:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 19:17 [Bug c++/59292] New: Spurious warning: ‘<anonymous>’ is used uninitialized in this function bluesmissionnaire at gmail dot com
2013-11-25 22:58 ` [Bug c++/59292] " manu 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).