POV-Ray : Newsgroups : povray.programming : mixing POV code with C++ : Re: POV source errors Server Time
29 Jul 2024 06:22:31 EDT (-0400)
  Re: POV source errors  
From: Jon A  Cruz
Date: 13 Feb 1999 02:51:56
Message: <36C52BCA.8AED0DA7@geocities.com>
Thorsten Froehlich wrote:

> > In my experience this is not the best state to leave code in, so what's the
> > current status on this?
>
> Well, VC 5 is everything but confrom to any C/C++ standard, so don't expect
> that all warnings it shows will ever be eliminated :-)  Most of its C++
> warnings or errors are simply _wrong_ if you comapre it to the ISO C++
> standard. I hope (but don't know) that most of these compiler bugs are fixed
> in VC 6. If they are not, just use a different compiler. Watcom or
> CodeWarrior will do and will generate much faster code as well. The problem
> is that they are expensive.
>

Yes, I understand much of this, but... the benefit I found in cleaning up those
warnings in other work helped in cleaning up code I've done in various
cross-platform work (DOS, OS/9, Win16, Unix, Win32, Linux ).

Now, the float/double issue could stand some investigation, and that is exactly
the kind of information I was looking for.

One side effect is that all those float/double warnings make it hard to spot the
significant warnings such as those from truetype.c:

warning C4101: 'i' : unreferenced local variable
warning C4018: '<' : signed/unsigned mismatch
warning C4244: '=' : conversion from 'unsigned short ' to 'unsigned char ',
possible loss of data
warning C4244: '=' : conversion from 'double ' to 'short ', possible loss of data

...
warning C4700: local variable 'len' used without having been initialized

Personally, I think the "unreferenced local variable" warnings that MS pops out
(even on it's java compiler) are extremely handy. Also, the signed/unsigned
mismatch gets very significant for font glyphs where the values are 16-bit
Unicode glyphs that are getting mapped from 8-bit chars, etc.


So, I have the float/double issue to mask and investigate later. Any others that
I should be aware of, or should I just go head and do some nit-picking and submit
my changes? (I know not to complain about anything without be willing to do
something about it).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.