From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,37b042cbca0bede1,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-06-17 07:06:30 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!not-for-mail From: zeisel@indmath.uni-linz.ac.at Newsgroups: comp.sys.dec Subject: Compiler bug in DEC C++??? (supplemented) Date: 17 Jun 1994 09:06:01 -0500 Organization: UTexas Mail-to-News Gateway Sender: nobody@cs.utexas.edu Message-ID: <00980183.222116ED.7923@indmath.uni-linz.ac.at> NNTP-Posting-Host: news.cs.utexas.edu The following code gives a run time error ``access violation'' using DEC C++ V1.3-0 on an ALPHA OpenVMS V1.5-1H1 machine, but works fine using DEC C++ V1.1-001 on a VAX. Is this a compiler bug or is there something wrong with my program? Newsfeed unreliable, please answer also via E Mail. Thanx, Helmut Zeisel zeisel@indmath.uni-linz.ac.at ---------------------------------------------------------------------- #define VERSION 1 #include #define DUMP(A) cout << #A << " = " << A << endl; class ClassA { double a; public: ClassA(double b) { a=b; } double get() const { return a; } }; typedef double (ClassA::*PTMF)() const; class ClassB { private: #if (VERSION == 1) ClassA * pvAH; #endif PTMF fct; #if (VERSION == 2) ClassA * pvAH; #endif public: ClassB::ClassB(ClassA * aH, PTMF f) { fct = f; DUMP((aH->*f)()); DUMP((aH->*fct)()); } }; // class ClassB main() { ClassA a(123.45); ClassB b(&a,&ClassA::get); } ---------------------------------------------------------------------- ------------------------------------------------------------------- Helmut Zeisel zeisel@indmath.uni-linz.ac.at Institut fuer Mathematik Universitaet Linz A-4040 Linz Tel +43-732-2468-9225 AUSTRIA/EUROPE Fax +43-732-246810