This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Access control + static ctor = bad error message
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Access control + static ctor = bad error message
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Wed, 23 Feb 2000 14:05:19 -0800
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20000223000957.D8754@perlsupport.com> <u91z63pswg.fsf@yorick.cygnus.com>
According to Jason Merrill:
> Fixed.
Thanks! Looks like it works just fine now.
But I have a related nit to report: When I break visibility rules in a
static initializer, the resulting error message reveals a lot more of
g++'s internals that we probably would like. Given this priv.cc:
class B { B(int) {} }; // intentionally private
B b(1);
Here are the messages:
priv.cc: In function `void __static_initialization_and_destruction_0
priv.cc: (int, int)':
priv.cc:1: `B::B (int)' is private
priv.cc:2: within this context
I should think that "In function `void __static_init...'" should be
prettyprinted as "In static initialization". If that's OK, I'll make
a patch.
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K