public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38477]  New: [strict-aliasing] warning message contains compiler-generated symbols
@ 2008-12-10 17:17 dimhen at gmail dot com
  2008-12-10 17:40 ` [Bug libstdc++/38477] " rguenth at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: dimhen at gmail dot com @ 2008-12-10 17:17 UTC (permalink / raw)
  To: gcc-bugs

[root@localhost gcc_err]# g++ -Wall -c -O3 test.cpp
test.cpp: In member function 'void
test::bar(std::_List_iterator<KeyPairPtr<int, int> >&)':
test.cpp:14: warning: dereferencing pointer '__x.13' does break
strict-aliasing rules
/usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
note: initialized from here
test.cpp:14: warning: dereferencing pointer '__x.13' does break
strict-aliasing rules
/usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
note: initialized from here

[root@localhost gcc_err]# g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++ :
(reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion
Thread model: posix
gcc version 4.4.0 20081210 (experimental) [trunk revision 142645] (GCC)

[root@localhost gcc_err]# uname -a
Linux localhost.localdomain 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:59:36
EDT 2008 i686 i686 i386 GNU/Linux

[root@localhost gcc_err]# cat test.cpp
#include <set>
#include <list>

template<class Key, class Info>
class KeyPairPtr
{
public:
   typedef typename std::pair< const Key, Info > Pair;
   Pair *pair_ptr;
};

template<class Key, class Info>
bool operator <( const KeyPairPtr<Key, Info> &left, const
KeyPairPtr<Key, Info> &right ) {
   return left.pair_ptr < right.pair_ptr;
}

typedef KeyPairPtr<int,int> key_val;

class test
{
   test();
   void bar( std::list<key_val>::iterator &ci );

   std::set<key_val> foo;
};

void test::bar( std::list<key_val>::iterator &ci )
{
   test ctx;
   ctx.foo.insert( *ci );
}


-- 
           Summary: [strict-aliasing] warning message contains compiler-
                    generated symbols
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dimhen at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2009-01-14 16:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-10 17:17 [Bug c++/38477] New: [strict-aliasing] warning message contains compiler-generated symbols dimhen at gmail dot com
2008-12-10 17:40 ` [Bug libstdc++/38477] " rguenth at gcc dot gnu dot org
2008-12-10 17:46 ` rguenth at gcc dot gnu dot org
2008-12-12 11:11 ` paolo dot carlini at oracle dot com
2008-12-12 11:25 ` rguenth at gcc dot gnu dot org
2008-12-12 11:40 ` paolo dot carlini at oracle dot com
2008-12-12 11:45 ` rguenth at gcc dot gnu dot org
2008-12-12 11:54 ` paolo dot carlini at oracle dot com
2008-12-12 11:58 ` rguenth at gcc dot gnu dot org
2008-12-12 12:10 ` rguenth at gcc dot gnu dot org
2009-01-05 23:47 ` bkoz at gcc dot gnu dot org
2009-01-06 19:45 ` rguenth at gcc dot gnu dot org
2009-01-12 14:26 ` rguenth at gcc dot gnu dot org
2009-01-12 14:43 ` pluto at agmk dot net
2009-01-12 14:52 ` rguenth at gcc dot gnu dot org
2009-01-13 11:03 ` rguenth at gcc dot gnu dot org
2009-01-13 12:14 ` rguenth at gcc dot gnu dot org
2009-01-14 16:45 ` [Bug middle-end/38477] " rguenth at gcc dot gnu dot org
2009-01-14 16:47 ` 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).