public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "julien dot sagnard at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/37854]  New: No error when creating a variable from itself
Date: Thu, 16 Oct 2008 16:03:00 -0000	[thread overview]
Message-ID: <bug-37854-16841@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-10-16 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16 16:03 julien dot sagnard at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-37854-16841@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).