Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Zerksis D. Umrigar
Tue, 12 Jan 1993 06:10
G++ Bug in Friend Visibility
Author: Zerksis D. Umrigar
Date: Tue, 12 Jan 1993 06:10
Date: Tue, 12 Jan 1993 06:10
29 lines
1205 bytes
1205 bytes
/*
The following fails to compile under gcc-2.3.3 (mips-dec-ultrix4.2).
Problems are caused by the two commented lines (one of which is explicitly
declared as legal in the ARM). The code is followed by a compilation log.
*/
class X {
enum {a= 100};
friend class Y;
};
class Y {
int v[X::a]; //According to the ARM (pg. 250), this should work.
public:
void f(int i= X::a); //What I really want to do, but same bug as above?
};
/*--- COMPILATION LOG
cd /usr/users/zdu/pl_imp/pl3/
gcc -c bug4.cc
bug4.cc:13: enum `a' is a private value of class `X'
bug4.cc:15: enum `a' is a private value of class `X'
Compilation exited abnormally with code 1 at Sun Jan 10 16:02:49
---
-zerksis umrigar <umrigar@bingsuns.cc.binghamton.edu>
======
*/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads