public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "a.chavasse at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/47704] New: [4.6 regression] [C++0x] Java-related error message when trying to instantiate a strongly typed enum with new
Date: Fri, 11 Feb 2011 18:52:00 -0000	[thread overview]
Message-ID: <bug-47704-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: [4.6 regression] [C++0x] Java-related error message
                    when trying to instantiate a strongly typed enum with
                    new
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: a.chavasse@gmail.com


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-src/configure --enable-lto --prefix=/usr
--enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.6.0 20110211 (experimental) (GCC) 

It was built from svn trunk, revision 170055

The following code fails to compile with this error (with -std=c++0x):
bug.cpp: In function ‘int main(int, char**)’:
bug.cpp:9:7: error: call to Java constructor, while ‘jclass’ undefined

========
int main( int argc, char** argv )
{
  enum class SomeEnum
  {
    AAA,
    BBB
  };

  new SomeEnum;

  return 0;
}
========

It worked in gcc 4.5.


             reply	other threads:[~2011-02-11 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11 18:52 a.chavasse at gmail dot com [this message]
2011-02-11 18:55 ` [Bug c++/47704] " redi at gcc dot gnu.org
2011-02-13 17:46 ` jsm28 at gcc dot gnu.org
2011-02-14 12:23 ` jakub at gcc dot gnu.org
2011-02-15 15:59 ` jakub at gcc dot gnu.org
2011-02-15 16:09 ` jakub at gcc dot gnu.org
2011-02-15 16:22 ` jakub at gcc dot gnu.org
2011-02-16  9:17 ` jakub at gcc dot gnu.org
2011-02-16 10:05 ` jakub at gcc dot gnu.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-47704-4@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).