Article View: gnu.g++.bug
Article #1391G++ Bug in Friend Visibility
From: 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>
======
*/
Technical Details
Message-ID:
<9301120610.AA18989@bingsuns.cc.binghamton.edu_>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigarShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigar From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar) Subject: G++ Bug in Friend Visibility Message-ID: <9301120610.AA18989@bingsuns.cc.binghamton.edu_> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 12 Jan 1993 06:10:35 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 30