POV-Ray : Newsgroups : povray.programming : mixing POV code with C++ : Re: POV source errors Server Time
29 Jul 2024 06:15:11 EDT (-0400)
  Re: POV source errors  
From: Thorsten Froehlich
Date: 12 Feb 1999 16:09:55
Message: <36c498a3.0@news.povray.org>
In article <36C3E3A8.E381FEDB@geocities.com> , "Jon A. Cruz" 
<jon### [at] geocitiescom> wrote:

> Just as an aside, when I built the source using VC 5, I get about 710
> warnings.

Wow! I get 1592 warnings if I activate the warnings for "implicit aritmmetic
conversions" and "unused arguments".
The point is that the implicit aritmmetic conversions are explicitly
mentioned in the ISO C++ standard and therefore are no code problem. Most
compilers have an option to show these warning. Just find the compiler
switch and deactivate them. The same goes for (currently) unused arguments.

All these warnings are for some reason part of the warning level 1 in VC 5.
The only lower level is level 0 which deactivated all warnings.
I leave it to you to imagine why Microsofts thinks it needs do warn users if
_well documented_ (and used for decades) *ISO* standard behaviour is
expected by the source code (programmer)...
However, you find what the MS progammers think of the standard in remarks
like those for warning C4800.

> 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.


    Thorsten


From the ISO 14882 standard (ISO C++ standard):

4 Standard conversions [conv]

1 Standard conversions are implicit conversions defined for built-in types.


4.8 Floating point conversions [conv.double]

1 An rvalue of floating point type can be converted to an rvalue of another
floating point type. If the source value can be exactly represented in the
destination type, the result of the conversion is that exact representation.
If the source value is between two adjacent destination values, the result
of the conversion is an implementation-defined choice of either of those
values. Otherwise, the behavior is undefined.


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: Tho### [at] csicom

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://www.povray.org


Post a reply to this message

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