This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Lint error 96

I have a problem trying to get PC-Lint to work from within Keil uVision4.

I have a very simple code but Lint is still giving me errors. The code is....

#include <stdio.h>
int main (void)
{
        int i = 1;
}

However when i run Pc-lint using the CO-RV.LNT file from withing uVision i get the following errors...

PC-lint for C/C++ (NT) Vers. 9.00c, Copyright Gimpel Software 1985-2009
C:\Temp\Uv3__43.lnt(3,0): Error 10: Expecting '}'
C:\Temp\Uv3__43.lnt(3,0): Error 96: Unmatched left brace for linkage specification on line 30, file C:\Program Files\Keil\ARM\RV31\INC\stdio.h
C:\Program Files\Keil\ARM\RV31\INC\stdio.h(30,0): Info 830: Location cited in prior message
C:\Temp\Uv3__43.lnt(3,0): Error 96: Unmatched left brace for namespace std on line 28, file C:\Program Files\Keil\ARM\RV31\INC\stdio.h
C:\Program Files\Keil\ARM\RV31\INC\stdio.h(28,0): Info 830: Location cited in prior message


I have setup PC-Lint from within uVision to use the following include folder C:\Program Files\Keil\ARM\RV31\INC\ which is where its grabbing stdio.h from.
Is this correct?

Why am i getting these error?, surely lint should work correctly with such simple code.

  • Your code may be simple.

    But the errors are not in your code, but in the included stdio.h file.

    Is PC-Lint configured to correctly understand that Keil is using a number of language extensions, for example to specify which memory a pointer relates to?

    Many embedded compilers have non-ANSI extensions, and the Lint program must either know that it should ignore standard headers, or it must understand the extensions. Obviously, if you are going to use extensions in your own code, the Lint program must support these extensions.

  • i am running lint from uVision4 tools menu and using the pc-lint configuration file supplied with the ARM toolset( CO-RV.LNT). I would have thought that this configuration file would have been capable of allowing lint to parse the stdio.h file that also comes with the application.