What's wrong with this program?
Phil Windley/20000000
windley at cheetah.cs.uidaho.edu
Fri Apr 5 05:52:36 AEST 1991
This program fails to compile on a DS5000PX running Ultrix 4.1. It
compiles fine on HPs, Apollos, Suns, etc.
The problem is a simple example of a larger failure of AKCL to work.
Any information appreciated.
/*
Volatile test program for DS5000. This code is taken from the AKCL file
cmpinclude.h.
No error when compiled with cc -c volatile.c Structure error when compiled with cc -DVOL=volatile -c volatile.c
VOL is a macro qualifying the type declarations in the test function.
*/
#define FIRSTWORD short t; short m
#define SGC_TOUCH(x)
#ifndef VOL
#define VOL
#endif
typedef union lispunion *object;
struct cons {
FIRSTWORD;
object c_cdr;
object c_car;
};
struct structure { /* structure header */
FIRSTWORD;
object str_def; /* structure definition (a structure) */
object *str_self; /* structure self */
};
struct dummy {
FIRSTWORD;
};
union lispunion {
struct cons c;
struct dummy d;
};
enum type {
t_cons,
t_other
};
#define type_of(obje) ((enum type)(((object)(obje))->d.t))
#define CMPcar(x) (x)->c.c_car
void test()
{
VOL object VV1;
object VV2;
VV2 = CMPcar((VV1));
}
--
Phil Windley | windley at cs.uidaho.edu
Assistant Professor | windley at cheetah.cs.uidaho.edu
Department of Computer Science |
University of Idaho | Phone: 208.885.6501
Moscow, ID 83843 | Fax: 208.885.6645
More information about the Comp.unix.ultrix
mailing list