S
Skarmander
This can't possibly be right because xge_mklink_slot is defined in suchBut even so, it should only be used in a way that does not compromise
type safety, by defining the type-safe functions:
/* Unlike XGE_MKLINK_SLOT, the compiler will warn or stop if the
argument types do not match the formal parameter types. */
[return-type] xge_mklink_slot(xge_com* com, xge_cell from, xge_cell to,
tkey slotfrom, tkey slotto) {
return XGE_MKLINK_SLOT(com, from, to, slotfrom, slotto);
}
a way that it cannot evaluate to an expression. Should be
[return-type] xge_mklink_slot(xge_com* com, xge_cell from, xge_cell to,
tkey slotfrom, tkey slotto) {
XGE_MKLINK_SLOT(com, from, to, slotfrom, slotto);
}
It's likely that XGE_MKLINK_SLOT contains no return statement at all,
and [return-type] is just "void".
Left as an exercise to the reader: why could this otherwise produce
warnings of unreachable code, and how should we fix this? Just another
example of why macros should be used carefully.
S.