* Compiler bug in DEC C++??? (supplemented)
@ 1994-06-17 14:06 zeisel
1994-06-18 5:48 ` jmack
1994-06-29 17:46 ` harold seigel
0 siblings, 2 replies; 4+ messages in thread
From: zeisel @ 1994-06-17 14:06 UTC (permalink / raw)
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 <fstream.h>
#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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Compiler bug in DEC C++??? (supplemented)
1994-06-17 14:06 Compiler bug in DEC C++??? (supplemented) zeisel
@ 1994-06-18 5:48 ` jmack
1994-06-20 22:24 ` alan
1994-06-29 17:46 ` harold seigel
1 sibling, 1 reply; 4+ messages in thread
From: jmack @ 1994-06-18 5:48 UTC (permalink / raw)
In article <00980183.222116ED.7923@indmath.uni-linz.ac.at>
zeisel@indmath.uni-linz.ac.at writes:
> 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
Don't think it's your code. It compiles and runs fine with gnu's c++ (2.5.7)
here on a glorious NeXT:
25 skye# c++ -o helmut helmut.cc
26 skye# helmut
(aH->*f)() = 123.45
(aH->*fct)() = 123.45
--
James S. MacKinnon Office: P-139 Avahd-Bhatia Physics Lab
Computing/Networking Phone : (403) 492-8226
Department of Physics email : jmack@phys.ualberta.ca
University of Alberta uucp : uofaphys!jmack iskye!jmack
Edmonton, Canada T6G 2N5 bitnet: jmack@triumfcl jsm1@ualtamts
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler bug in DEC C++??? (supplemented)
1994-06-18 5:48 ` jmack
@ 1994-06-20 22:24 ` alan
0 siblings, 0 replies; 4+ messages in thread
From: alan @ 1994-06-20 22:24 UTC (permalink / raw)
In article <2tu1rn$hk9@quartz.ucs.ualberta.ca>, jmack@skye.phys.ualberta.ca writes:
> In article <00980183.222116ED.7923@indmath.uni-linz.ac.at>
> zeisel@indmath.uni-linz.ac.at writes:
>> 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
>
> Don't think it's your code. It compiles and runs fine with gnu's c++ (2.5.7)
> here on a glorious NeXT:
>
> 25 skye# c++ -o helmut helmut.cc
> 26 skye# helmut
> (aH->*f)() = 123.45
> (aH->*fct)() = 123.45
>
I missed the original posting, but I gather from the output that it
refers to a possible bug in DEC C++ V1.3 on Alpha. I found a bug
with pointers to member functions a few weeks ago which I am in the
process of writing up to send an SPR to DEC. I would be interested
to hear of other people's experiences.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler bug in DEC C++??? (supplemented)
1994-06-17 14:06 Compiler bug in DEC C++??? (supplemented) zeisel
1994-06-18 5:48 ` jmack
@ 1994-06-29 17:46 ` harold seigel
1 sibling, 0 replies; 4+ messages in thread
From: harold seigel @ 1994-06-29 17:46 UTC (permalink / raw)
Thank you for reporting this problem. Your program shows a bug in the DEC C++
V1.3-0 compiler for OpenVMS AXP. Under certain conditions, the compiler does
not properly handle pointers to member functions. We have fixed the problem and
a compiler containing the fix will be available in an upcoming release.
Please let us know if you need a workaround, until the new compiler is
available.
Thank you, Harold Seigel (DEC C++ project member)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1994-06-29 17:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-06-17 14:06 Compiler bug in DEC C++??? (supplemented) zeisel
1994-06-18 5:48 ` jmack
1994-06-20 22:24 ` alan
1994-06-29 17:46 ` harold seigel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox