public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47704] New: [4.6 regression] [C++0x] Java-related error message when trying to instantiate a strongly typed enum with new
@ 2011-02-11 18:52 a.chavasse at gmail dot com
  2011-02-11 18:55 ` [Bug c++/47704] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: a.chavasse at gmail dot com @ 2011-02-11 18:52 UTC (permalink / raw)
  To: gcc-bugs

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.


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

end of thread, other threads:[~2011-02-16  9:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 18:52 [Bug c++/47704] New: [4.6 regression] [C++0x] Java-related error message when trying to instantiate a strongly typed enum with new a.chavasse at gmail dot com
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

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).