[fpc-devel]New warning?

Judison jueca at brturbo.com
Mon Dec 2 05:53:11 CET 2002


Hi friends,

First, excuse the long mail, and my poor english.

Since my last "cvs update fpc", I'm getting a lot of warnings, but some seens "stupid" to me :)
If I compile my project with -Cr there are a lot of:
Warning: Type size mismatch, possible loss of data / range check error

Lets see a small example program.
Observe that "MyWord := MyWord + 1", is OK to warning, one day MyWord can be $FFFF...
but, in "MyWord := MyByte + 1" or "MyWord := MyByte + Byte(1)" whats wrong with this?

... and, the other situation, if IntA is Smallint, Inc(IntA) gets warned,
BUT when it is Longint, Inc(IntA) gets no warning...

This is a bug?

PS: to compile the lastest CVS version, I need to change in fcl\xml\htmwrite.pas:
  s := LowerCase(node.NodeName);
to:
  s := node.NodeName;
  s := LowerCase(s);
else, the compiler don't know what overload function to use.
and remove h2pas from makefile
else I get:
h2pas.pas(7639,1) Error: Local variable size exceed limit for certain cpu's

TIA
Your friend,
Judison
-------------- next part --------------
A non-text attachment was scrubbed...
Name: types.pp
Type: application/octet-stream
Size: 604 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20021202/29d05026/attachment.obj>


More information about the fpc-devel mailing list