I am trying to get rid of the 117 warnings in the code I was given to modify. The warning I am working on now is shown by”
Code:
#include <stdio.h>
int main()
{
long fpos;
fpos= 1000001;
if(fpos > 1000000)
{
printf("fpos is bigger\n");
}
else
{
printf("Smaller\n");
}
return(0);
}
When I build this code in the Borland C++ version 4.52 IDE configured for the 16 bit 80186 instruction set I get the following messages:
“Compiling TEST.CPP:
Warning TEST.CPP 8: Constant is long in function main()
Warning TEST.CPP 9: Constant is long in function main()
Linking test.exe:”
The program is doing what I expect but I want to get rid of the warning.
The help file says “Inline assembler numeric constants must be integers between -2,147,483,648 and 4,294,967,295, and they must start with one of the digits 0 through 9 or a $ character.”
So, how can I get rid of the warning?