[splint-discuss] Parse error with @ from the IAR compiler
Keith.Richeson at us.elster.com
Keith.Richeson at us.elster.com
Fri Jan 19 06:11:35 PST 2007
Hello all,
I'm sorry if this has already been discussed, but I searched the archive
back through the past year and was not able to find any related
information.
I'm working on an embedded project and we are using the IAR C compiler for
the 8051. One of the extensions to the compiler is that it allows a user
to "locate" a variable using the @ symbol. That is to say, if I want to
make sure that a variable gets allocated at location 0xFFE0 in RAM, I can
use the following declaration:
int myVar @ 0xFFE0;
and the compiler will understand the statement.
Of course since this is not standard C splint is not happy with the above
statement, and in fact a parse error is generated so using /*@ignore@*/
doesn't help. My first idea of how to deal with this is to define @ = ";
//" so that the line effectively ends at the @ symbol and everything else
is a comment. Unfortunately when I add the following line to my .lclintrc
file:
-D@="; //"
I get the following message from splint:
Splint 3.1.1 --- 12 April 2003
Command Line: Malformed option `-D@='"; //"''
Preprocessing error. (Use -preproc to inhibit warning)
Preprocessing error for file: assert.c
*** Cannot continue.
Is there something I need to do to escape the @ symbol in the .lclintrc
file? Does anyone have any other suggestions for getting around this
issue? Thanks!!!
Keith Richeson
(919) 250-5511
keith.richeson at us.elster.com
"A problem well stated is a problem half solved"
More information about the splint-discuss
mailing list