[Prev][Next][Index]
alpha c++ compiler bug (and workaround)
- To: sage-bugs@extreme.indiana.edu
- Subject: alpha c++ compiler bug (and workaround)
- Date: Tue, 06 Jun 1995 14:14:33 -0700
- From: Lars Thomas Hansen <lth@cs.uoregon.edu>
- Sender: owner-sage-bugs@extreme.indiana.edu
There is what I believe to be a bug in the DEC Alpha C++ compiler, at
least in the version at Colorado. The bug appears with declarations
like the following:
extern void pcaw_EnterPar( class Kernel *, int );
where Kernel is a not previously defined class. When Kernel later becomes
defined, it is as a separate symbol: the Kernel in the declaration above
does not match with the new definition.
The workaround is to move the declaration of Kernel outside of the
function header:
class Kernel;
extern void pcaw_EnterPar( Kernel *, int );
and it works.
Someone should fix the code in target/include/runtime.h which uses this
construct (for the master-slave system); I'll do it myself if I remember
(but not now).
The reason why I claim this is a bug is mostly by majority vote: all
other compilers seem to grok it. The devil only knows what the alleged
draft standard says.
--lars