What is the meaning of lint free program?
Lint free program
Collapse
X
-
Tags: None
-
Not sure, where did you hear that?
If i had to guess, i would say no magic numbers. But that is 100% guess -
Originally posted by SpecialKayNot sure, where did you hear that?
If i had to guess, i would say no magic numbers. But that is 100% guessComment
-
I read this term in the book of data structures. Where certain syntax was written and given that if we use it it will make our program lint free..
I couldnt get its meaning in dictionary.Comment
-
http://en.wikipedia.org/wiki/Lint_programming_tool 'lint free' is likely something that has no issues when checked by lint.Comment
-
i was wrong, nothing to do with magic numbers.
magic numbers are:
case 1:
[code=cpp]
for(int i = 0; i < 9; i++)
{
print i;
}
[/code]
In this case the number 9 is a magic number. it is proper to code this for loop:
case 2:
[code=cpp]
int MAX_LOOP = 9;
for(int i=0; i < MAX_LOOP; i++)
{
print i;
}
[/code]Comment
-
-
Originally posted by Parul BagadiaThanx. i read it. And i understood it a bit.
program accoring to the old K&R standard. It used to be handy but compilers
can do that job now, (for gcc set the -Wall warning flag).
kind regards,
JosComment
-
Originally posted by JosAHLint is an (almost) obsolete pre-ANSI-C tool; it checks conformance of a C
program accoring to the old K&R standard. It used to be handy but compilers
can do that job now, (for gcc set the -Wall warning flag).
Also most lint programs can perform cross source checks that a compiler is normally unable to do, that is a compiler normally only considers a single C or CPP file when compiling but lint can consider a group of files. For instance lint can tell you if an function declared with external linkage is not used which most compilers can't.Comment
-
Originally posted by BanfaStrictly speaking you mean well written compilers can do that now. There are plenty of platforms with less well written compilers that can still benefit from using lint.
Also most lint programs can perform cross source checks that a compiler is normally unable to do, that is a compiler normally only considers a single C or CPP file when compiling but lint can consider a group of files. For instance lint can tell you if an function declared with external linkage is not used which most compilers can't.
to be able to determine whether or not a global function gets called.
kind regards,
JosComment
Comment