POV-Ray : Newsgroups : povray.programming : HF height: bug report : Re: HF height: bug report Server Time
6 Oct 2024 16:15:44 EDT (-0400)
  Re: HF height: bug report  
From: Vadim Sytnikov
Date: 5 Aug 2001 09:14:16
Message: <3b6d46a8@news.povray.org>
Unfortunately, such things are not C-specific, and thus C++ is
not a panacea. They are tackled differently, yes, but I dare say
C is not worse at that.

For example, those unused function parameters you mention. For
decades, it's been a good C programming habit to write an extra
statement like this

    (void) my_unused_function_argument;

to prevent compiler from generating a warning. I'm pretty sure I
could point out a C counterpart of every "C++ feat" in that area.
Not to say that lint is by far stricter than any C++ compiler.

You're rigth in that warnings shouldn't (must not, I would say) be
taken lightly. Somebody must take care of that.

Warp <war### [at] tagpovrayorg> wrote in message news:3b6d2f36@news.povray.org...
>   A good compiler would issue a warning there (because the condition is
> always false) and the bug would have been located immediately.
>   However, as the POV-Ray source code issues about 10000 warnings I
suppose
> that no-one has full warnings turned on in their compilers (or if they
have,
> this specific warning gets buried under all the other 9999 ones).
>
>   Warnings are always important and they shouldn't be taken lightly. This
> ideology has not been followed in POV-Ray.
>   Fortunately now that POV-Ray will be written in C++ it will be possible
to
> completely get rid of all warnings (C++ allows getting rid of certain
> warnings the C version has and you can't do anything about it: Unused
function
> parameters: Just don't give the parameter a name).
>
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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