public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37854]  New: No error when creating a variable from itself
@ 2008-10-16 16:03 julien dot sagnard at gmail dot com
  2008-10-16 16:18 ` [Bug c++/37854] " paolo dot carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: julien dot sagnard at gmail dot com @ 2008-10-16 16:03 UTC (permalink / raw)
  To: gcc-bugs

If I try to compile this code:

class X {};

int main {
  int i = i;
  X x = x;
  X y(y);
  return 0;
}

With:
gcc -Wall main.cpp

There is no error and no warning.


INFOS:

OS:
Ubuntu Hardy

gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

uname -a
Linux VmWare-Ubuntu 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008 i686
GNU/Linux


-- 
           Summary: No error when creating a variable from itself
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: julien dot sagnard at gmail dot com


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


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

end of thread, other threads:[~2008-10-21 20:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 16:03 [Bug c++/37854] New: No error when creating a variable from itself julien dot sagnard at gmail dot com
2008-10-16 16:18 ` [Bug c++/37854] " paolo dot carlini at oracle dot com
2008-10-16 16:20 ` paolo dot carlini at oracle dot com
2008-10-16 16:23 ` paolo dot carlini at oracle dot com
2008-10-16 19:09 ` pinskia at gcc dot gnu dot org
2008-10-21 20:59 ` manu 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).