Article View: gnu.g++.bug
Article #1171g++ bug
From: Zerksis D. Umrigar
Date: Sun, 27 Dec 1992 20:41
Date: Sun, 27 Dec 1992 20:41
38 lines
1270 bytes
1270 bytes
/*
The following fails to compile under a unmodified gcc 2.3.2
(mips-dec-ultrix4.2). It compiles if the marked (enum) line below is
removed and the values for N and D directly substituted in the return
expression for f. The compilation log is shown after the program.
*/
class X {
class S {
int m;
public:
S(int i) : m(i) { }
int f(void) {
enum {N= 8, D= 10 }; //Problem.
return (m*N)/D;
}
};
S s;
public:
X(int i) : s(i) { }
int f(void) { return s.f(); }
};
/* COMPILATION LOG.
gcc -c t2.cc
t2.cc: In method `int S::f ()':
t2.cc:17: Internal compiler error 12.
t2.cc:17: Please report this to `bug-g++@prep.ai.mit.edu'.
Compilation exited abnormally with code 1 at Sun Dec 27 15:25:33
-zerksis umrigar (umrigar@bingsuns.cc.binghamton.edu).
*/
Technical Details
Message-ID:
<9212272041.AA23580@bingsuns.cc.binghamton.edu_>Path:
arc1-ca.pugleaf.net!sparky!uunet!crdgw1!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigarShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!crdgw1!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigar From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar) Newsgroups: gnu.g++.bug Subject: g++ bug Message-ID: <9212272041.AA23580@bingsuns.cc.binghamton.edu_> Date: 27 Dec 92 20:41:17 GMT Sender: gnulists@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 38 Approved: bug-g++@prep.ai.mit.edu