I think that it would be good enough to simply remove the warning
message. If the token in question is in fact undefined the C
compiler will report this. Since snc emits appropriate '#line'
directives the resulting error message will refer to the correct
source line.

On Apr 4, 2006, at 11:46 AM, Benjamin Franksen wrote:

On Tuesday 04 April 2006 17:43, J. Lewis Muir wrote:

A feature I would like is for snc to not generate warning messages
for variables that are defined in other included source files. For
example:

Warning: variable "asynSuccess" is used but not declared.

I get this message at compile time if I'm using the asyn module and
want to check the return status of an asyn function call from the SNL
program. asynSuccess is defined as an asynStatus enum value in
asynDriver.h which I have included in my SNL program.

These warnings are common when defines or enums or whatever are
defined in other files and one wants to reference them from the SNL
program.

This is probably going to be difficult. It would mean snc must
parse all
the header files that are included. However, snc does not contain a
full-flegded C parser: it recognizes only a small subset of C.
Particularly, it cannot (IIRC) parse any C declarations.