I don't like the casts to (void) for unused parser attributes (which become variables in SID's generated C), usually by way of an explicit ! directive (meaning to ignore a value):
/*
* The (void) casts on output parameters that are unused in some dialects.
* This keeps gcc from complaining about generated variables that are
* assigned a value but not used, without disabling the warning in general.
*/
One problem is C is abstracted from whatever the output language's types are, so it can't cast these itself. I thought about having SID output a macro like UNUSED(...) which we could define in the .act file to suit our types. But I'm not confident that this would cover all situations here, and I'm more interested in getting -Werror in place first.
I don't like the casts to
(void)
for unused parser attributes (which become variables in SID's generated C), usually by way of an explicit!
directive (meaning to ignore a value):One problem is C is abstracted from whatever the output language's types are, so it can't cast these itself. I thought about having SID output a macro like
UNUSED(...)
which we could define in the .act file to suit our types. But I'm not confident that this would cover all situations here, and I'm more interested in getting -Werror in place first.