Hello everyone,
While working on symbol table copying, I have run into trouble copying
type.ref pointers that point to garbage. Suppose we have a type struct
called "type_to_check". Then I thought the following check would ensure
that the .ref field was valid:
int btype = type_to_check->type.t & VT_BTYPE;
if (btype == VT_PTR || btype == VT_STRUCT || btype == VT_FUNC) {
/* type_to_check.ref is a valid pointer */
}
Yet I seem to run into trouble. Does this look correct?
David
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel