In MW Pascal, if a parameter is not used, then it can generate a warning, which you can silence with
{$unused( param_name )}
However GPC barfs when it sees this.
I believe the GPC way to silence the warning is to use attribute(unused), but then I also believe GPC does not currently catch this particular case.
I'm trying to ensure by source code both
a) compiles cleanly without any warnings and b) compiles under both GPC and MW Pascal
Unfortunately, while I could probably define a macro like:
{$ifdef __GPC__} {$definec NOTUSED attribute(unused)} {$elsec} {$definec NOTUSED } {$endc}
and add the NOTUSED entries to my parameters, I cannot think of any way to get GPC to ignore or udnerstand the {$unused( param_name )}
Could $unused either be supported to disable the warning for a variable/parameter, or could we get some sort of flag to allow {$unused(x,y,z)} to be silently ignored so that it is possible to write code that is source compatible?
Thanks, Peter.