[5977] in Athena Bugs
Saber msg: v2.1.2 (DECstation Beta 3) (2/7/90 scharoun decstation Ultrix 3.x 0 0)
daemon@ATHENA.MIT.EDU (janson@ATHENA.MIT.EDU)
Fri Sep 7 14:25:45 1990
From: janson@ATHENA.MIT.EDU
Date: Fri, 7 Sep 90 14:25:29 EDT
To: bugs@ATHENA.MIT.EDU
saber will fail to load a file with preprocessor macros.
it will load the fill if it is filtered through cpp. (once other
syntax problems with cpp output are rectified.)
the error:
"sm_mc_type.c":495, Declaration syntax (Error #243)
Illegal declaration syntax near 'P'.
the offending line:
CellIdentityPredicate(Null, Nil);
CellIdentityPredicate(False, ConstructFalse())
CellIdentityPredicate(True, ConstructTrue())
CellIdentityPredicate(Unspecified, ConstructUnspecified())
CellIdentityPredicate(Undefined, ConstructUndefined())
CellDereferencedTypePredicate(SingleFloat)
CellDereferencedTypePredicate(DoubleFloat)
CellDereferencedTypePredicate(Cons)
(it fails on the first one)
the associated macros
# ifdef __STDC__
# ifdef __HIGHC__
# define _concat_(x,y) _identity_(x)y
# define _identity_(x) x
# else __HIGHC__
# define _concat_(x,y) x ## y
# define _identity_(x) x
# endif __HIGHC__
# else __STDC__
# define _concat_(x,y) _identity_(x)y
# define _identity_(x) x
# endif __STDC__
# define _n_t_(type) _concat_(type,Type)
# define _n_at_(type) _concat_(_concat_(Adj,type),Type)
# define _n_st_(type) _concat_(type,_sT)
# define _n_St_(type) _concat_(type,_ST)
# define _n_ename_(type) _concat_(_concat_(MC,type),P)
# define _entry_(type) MCBoolean _n_ename_(type)(cell) Cell cell;
# define _t_dt_(cell,type) ((DereferencedTypeP(cell,type))?MC_TRUE:MC_FALSE)
# define _t_dat_(cell,type,atype)\
((DereferencedTypeP(cell,type) || (DereferencedTypeP(cell,atype)))?\
MC_TRUE:MC_FALSE)
# define _t_dSt_(cell,type) \
((DereferencedSuperTypeP(cell,type))?MC_TRUE:MC_FALSE)
# define _t_v_(cell,type) ((cell==type)?MC_TRUE:MC_FALSE)
# define _dt_body_(type) return( _t_dt_(cell,_n_t_(type)) );
# define _dat_body_(type) return( _t_dat_(cell,_n_t_(type),_n_at_(type)) );
# define _dSt_body_(type) return( _t_dSt_(cell,_n_St_(type)) );
# define _i_body_(value) return( _t_v_(cell,value) );
# define CellDereferencedTypePredicate(type) _entry_(type){_dt_body_(type)}
# define CellDereferencedAdjTypePredicate(type) _entry_(type){_dat_body_(type)}
# define CellDereferencedSuperTypePredicate(type) _entry_(type){_dSt_body_(type)}
# define CellIdentityPredicate(type,value) _entry_(type){_i_body_(value)}
this source will compile (at athena) with any of the other
supported compilers (i've never tried gcc).
thanks.