public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/40654]  New: atomic.cc: 'd' is used uninitialized warning
@ 2009-07-05 14:39 sezeroz at gmail dot com
  2009-07-05 18:09 ` [Bug libstdc++/40654] " paolo dot carlini at oracle dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-07-05 14:39 UTC (permalink / raw)
  To: gcc-bugs

During compilation of libstdc++ for i686-pc-mingw32, I noticed this warning:

../../../../gcc44-svn/libstdc++-v3/src/atomic.cc:83: warning: 'd' is used
uninitialized in this function
../../../../gcc44-svn/libstdc++-v3/src/atomic.cc:83: note: 'd' was declared
here

Notice the 'is used' and not 'maybe used'.  The warning was noted with gcc
shapshot r149016 from gcc-4_4-branch.  Does not happen for x86_64-pc-mingw32. 
The toolchain was compiled against mingw-w64 header-set and crt.


-- 
           Summary: atomic.cc: 'd' is used uninitialized warning
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sezeroz at gmail dot com
GCC target triplet: i686-pc-mingw32


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


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

* [Bug libstdc++/40654] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
@ 2009-07-05 18:09 ` paolo dot carlini at oracle dot com
  2009-07-06 23:55 ` bkoz at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-07-05 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2009-07-05 18:08 -------
Benjamin, can you have a look? To me, it seems a back-end issue in the
compiler, because I don't see anything wrong in the code...


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com


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


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

* [Bug libstdc++/40654] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
  2009-07-05 18:09 ` [Bug libstdc++/40654] " paolo dot carlini at oracle dot com
@ 2009-07-06 23:55 ` bkoz at gcc dot gnu dot org
  2009-07-22 14:29 ` [Bug libstdc++/40654] [C++0x] " paolo dot carlini at oracle dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-07-06 23:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bkoz at gcc dot gnu dot org  2009-07-06 23:55 -------

Yes, I will look at this. I think Ben Elliston pointed this out right after
4.4.0 was released, along with some other uninitialized warnings that I then
fixed. 

Apparently this is also visible on ppc.


-- 

bkoz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bkoz at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-06 23:55:04
               date|                            |


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


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

* [Bug libstdc++/40654] [C++0x] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
  2009-07-05 18:09 ` [Bug libstdc++/40654] " paolo dot carlini at oracle dot com
  2009-07-06 23:55 ` bkoz at gcc dot gnu dot org
@ 2009-07-22 14:29 ` paolo dot carlini at oracle dot com
  2009-10-16  7:48 ` bkoz at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-07-22 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2009-07-22 14:28 -------
See also PR40825.


-- 


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


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

* [Bug libstdc++/40654] [C++0x] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
                   ` (2 preceding siblings ...)
  2009-07-22 14:29 ` [Bug libstdc++/40654] [C++0x] " paolo dot carlini at oracle dot com
@ 2009-10-16  7:48 ` bkoz at gcc dot gnu dot org
  2009-10-16 19:49 ` sezeroz at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-10-16  7:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bkoz at gcc dot gnu dot org  2009-10-16 07:47 -------
Subject: Bug 40654

Author: bkoz
Date: Fri Oct 16 07:47:33 2009
New Revision: 152895

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152895
Log:
2009-10-15  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/40654
        PR libstdc++/40826
        * src/atomic.cc (atomic_flag_test_and_set_explicit): Add
        static_cast from base to derived.
        (atomic_flag_clear_explicit): Same.
        * include/bits/atomic_2.h (__atomic2::atomic_flag): Public derivation.
        Remove value type constructor.
        * include/bits/atomic_0.h (__atomic0::atomic_flag): Same.
        * include/std/future (_Future_state): Use ATOMIC_FLAG_INIT to
        initialized the atomic_flag member.


Added:
    trunk/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/
    trunk/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.c
    trunk/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/atomic_0.h
    trunk/libstdc++-v3/include/bits/atomic_2.h
    trunk/libstdc++-v3/include/std/future
    trunk/libstdc++-v3/src/atomic.cc


-- 


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


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

* [Bug libstdc++/40654] [C++0x] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
                   ` (3 preceding siblings ...)
  2009-10-16  7:48 ` bkoz at gcc dot gnu dot org
@ 2009-10-16 19:49 ` sezeroz at gmail dot com
  2009-10-18  3:30 ` bkoz at gcc dot gnu dot org
  2009-10-19 16:46 ` bkoz at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sezeroz at gmail dot com @ 2009-10-16 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sezeroz at gmail dot com  2009-10-16 19:49 -------
Any chance for a backport to 4.4 ?


-- 


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


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

* [Bug libstdc++/40654] [C++0x] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
                   ` (4 preceding siblings ...)
  2009-10-16 19:49 ` sezeroz at gmail dot com
@ 2009-10-18  3:30 ` bkoz at gcc dot gnu dot org
  2009-10-19 16:46 ` bkoz at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-10-18  3:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bkoz at gcc dot gnu dot org  2009-10-18 03:30 -------
Subject: Bug 40654

Author: bkoz
Date: Sun Oct 18 03:30:03 2009
New Revision: 152965

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152965
Log:
2009-10-16  Benjamin Kosnik  <bkoz@redhat.com>

        * include/c_compatibility/stdatomic.h: Include cstdatomic if
        __cplusplus.

2009-10-15  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/40654
        PR libstdc++/40826
        * src/atomic.cc (atomic_flag_test_and_set_explicit): Add
        static_cast from base to derived.
        (atomic_flag_clear_explicit): Same.
        * include/bits/atomic_2.h (__atomic2::atomic_flag): Public derivation.
        Remove value type constructor.
        * include/bits/atomic_0.h (__atomic0::atomic_flag): Same.
        * include/std/future (_Future_state): Use ATOMIC_FLAG_INIT to
        initialized the atomic_flag member.

Added:
   
branches/gcc-4_4-branch/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/
   
branches/gcc-4_4-branch/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.c
   
branches/gcc-4_4-branch/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc
   
branches/gcc-4_4-branch/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/1.cc
Modified:
    branches/gcc-4_4-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_4-branch/libstdc++-v3/include/bits/atomic_0.h
    branches/gcc-4_4-branch/libstdc++-v3/include/bits/atomic_2.h
    branches/gcc-4_4-branch/libstdc++-v3/include/c_compatibility/stdatomic.h
    branches/gcc-4_4-branch/libstdc++-v3/src/atomic.cc


-- 


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


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

* [Bug libstdc++/40654] [C++0x] atomic.cc: 'd' is used uninitialized warning
  2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
                   ` (5 preceding siblings ...)
  2009-10-18  3:30 ` bkoz at gcc dot gnu dot org
@ 2009-10-19 16:46 ` bkoz at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-10-19 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bkoz at gcc dot gnu dot org  2009-10-19 16:46 -------

In for gcc-4.4.3


-- 

bkoz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.3


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


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

end of thread, other threads:[~2009-10-19 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-05 14:39 [Bug libstdc++/40654] New: atomic.cc: 'd' is used uninitialized warning sezeroz at gmail dot com
2009-07-05 18:09 ` [Bug libstdc++/40654] " paolo dot carlini at oracle dot com
2009-07-06 23:55 ` bkoz at gcc dot gnu dot org
2009-07-22 14:29 ` [Bug libstdc++/40654] [C++0x] " paolo dot carlini at oracle dot com
2009-10-16  7:48 ` bkoz at gcc dot gnu dot org
2009-10-16 19:49 ` sezeroz at gmail dot com
2009-10-18  3:30 ` bkoz at gcc dot gnu dot org
2009-10-19 16:46 ` bkoz 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).