This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30962] cause compile error for "const anonymous class object"
- From: "gzljg at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2007 01:57:30 -0000
- Subject: [Bug c++/30962] cause compile error for "const anonymous class object"
- References: <bug-30962-13880@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from gzljg at hotmail dot com 2007-02-27 01:57 -------
Subject: RE: cause compile error for "const anonymous class object"
Hi Pinskia,
I update the notes there, can you take a look?
Thanks.
Gavin
>From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
>Reply-To: gcc-bugzilla@gcc.gnu.org
>To: gzljg@hotmail.com
>Subject: [Bug c++/30962] cause compile error for "const anonymous class
object"
>Date: 26 Feb 2007 23:00:22 -0000
>
>------- Comment #3 from pinskia at gcc dot gnu dot org 2007-02-26 23:00
-------
>(In reply to comment #2)
> > Not sure what you mean by "MyAnonymous = {};" to initialize it... if
change to:
>
>You example which you gave works for me with that:
> const class
>{
> public:
> int foo() const
> {
> return 1;
> }
>} MyAnonymous = {};
>
>int
>main()
>{
> return MyAnonymous.foo();
>}
>
>apinski@debian:~$ ~/x86-linux-4.0.2/bin/gcc t.cc
>apinski@debian:~$ gcc t.cc
>
>Anyways this is not a GCC bug but rather you not knowing C++.
>
>
>--
>
>pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
>----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30962
>
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30962