I'm having an issue with compiling with Lint. I get an ERROR 10 on interrupt definitions, but it compiles fine normally under Keil uVision.
// C file
void increment_timers(void) __irq { }
// header file
void increment_timers(void) __irq;
(391,28) - Expecting '{'
Line 391 is the line in the header file - above
Gimpel has been unable to find the problem. Any help would be appreciated. Thanks.
Sutton Mehaffey
Hi,
use this in the header file:
#ifdef _lint // PCLint does not know about __irq #define __irq #endif
There is also a "gobbling" mechanism (_gobble) for use in the config file, but this seems not to work reliably.
Martin Unger
You'll want to look at PC-Lint's documentation a bit closer. Particularly the +rw option.
OK. The +rw and -d options both get rid of the __irq Error message 10, but now I get ERROR 103: Unexpected declaration for Lines 392, 393, and 395 - column 5. Funny thing is line 391 doesn't have an error.
alert.h(392,5): ERROR 103: Unexpected declaration alert.h(393,5): ERROR 103: Unexpected declaration alert.h(395,5): ERROR 103: Unexpected declaration
391 - void increment_timers() __irq; 392 - void serial_rcv_read() __irq; 393 - void modem_read() __irq;
395 - void init_set_up();
// 'C' file
void serial_rcv_read() __irq { }
void modem_read() __irq { }
The +rw and -d options both get rid of the __irq Error message 10, but now I get ERROR 103: Unexpected declaration
That didn't reproduce in my cross check. I have to assume you used +rw incorrectly.