Unused parameter warnings

CBFalconer cbfalconer at yahoo.com
Mon Sep 20 13:53:45 CEST 2004


Peter N Lewis wrote:
(other attribution lines missing)
> 
... snip ...
>>>
>>>  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?
>>
>> I don't really like this syntax, because (our) compiler directives
>> usually don't refer directly to language elements (identifiers).
>>
>> So I'd rather tend to ignore it -- perhaps ignore `{$unused...}' in
>> Mac mode with a warning otherwise (or only if `-pedantic'?), just
>> like we ignore several BP directives?
> 
> Ignoring it would be fine, preferably not only in Mac mode, it would
> need its own switch or pedantic would be fine by me (I don't

In general it should not be too hard to search source files for
"{$" or "(*$" and edit directives.  My attitude in PascalP was to
ignore all unrecognized directives, and to spit out a warning for
any such.  After all, they are comments.

-- 
Chuck F (cbfalconer at yahoo.com) (cbfalconer at worldnet.att.net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!




More information about the Gpc mailing list