[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Re: 0 constants
- To: <tribble@evilotto>, <xtech@evilotto>
- Subject: Re: 0 constants
- From: Michael McClary <xanadu!michael>
- Date: Thu, 3 May 90 14:12:36 PDT
> Where should these compile time constants go? In the appropriate
> modules?
Were you planning to do if(foo == &UInt40) and the like? If not,
(much as I hate special-casing the translator) I'd suggest having
the ones that are equivalent to things that don't require construction
translate into c constants of the appropriate type, i.e.:
UInt40 => (UInt4)0
Int40 => (Int4)0
Long0 => 0L
Int0 => (int)0
NULL => NULL
and stuffing an instance of any that DO require constants into the
.cxx module that supports their type.
A translator warning message when it encounters an unqualified zero
might be a good idea a couple merges down the worldline.
michael