I write a lot of code for the HiTech C compiler. I am sure that my code will benefit from static verification, for example splint , but the bus itself works on some HiTech extensions, for example, cp0and sfr. However, I cannot just say that the bus skips the HiTech headers, because then it does not know who the majority of my identifiers are from.
Does anyone know a static check that can handle this?
Added: examples of extensions: Basically, these are only new type classifiers and absolute addressing, for example.
extern volatile cp0 unsigned int cp0_Config @ __REGADDR(16,0);
extern volatile sfr unsigned long OC2R @ 0xBF803210;
(There is also a type specifier persistent.)
There are also qualifiers interruptand fastfor the functions:
void interrupt ExceptionHandler(void) @GENERAL_EXCEPTION
{
...
}
Added:
, , , . script SED, "... @...;"
splint -D__32MX460F512L__ -Dsfr= -Dcp0= -Dmips32r2= -I ~/HiTechStripped mymodule.c
:
< Location unknown >: Field name reused:
Code cannot be parsed. For help on parse errors, see splint -help
parseerrors. (Use -syntax to inhibit warning)
< Location unknown >: Previous use of
< Location unknown >: Previous use of
< Location unknown >: Previous use of
[this goes on for about 100 lines...]
:
../../../../HiTechStripped/stdlib.h:140:39: mismatched parentheses in
Preprocessing error. (Use -preproc to inhibit warning)
, :
#if defined(_XA_) && sizeof(double) == 8
, , , . .