POV-Ray : Newsgroups : povray.general : Question 'bout indentation (no flamewar) : Re: Question 'bout indentation (no flamewar) Server Time
12 Aug 2024 09:22:07 EDT (-0400)
  Re: Question 'bout indentation (no flamewar)  
From: Johannes Hubert
Date: 31 Mar 1999 03:29:11
Message: <3701dcd7.0@news.povray.org>
Nieminen Mika wrote in message <3701c9cf.0@news.povray.org>...
>Johannes Hubert <jhu### [at] algonetse> wrote:
>: However, I would disagree with your second opinion:
>: Getting warnings is not a bad thing in general, because they are just
that:
>: "Warnings". They mean "Hey something here *might* be wrong, you're sure
you
>: wanna do this?" and you always have the choice (as in the given
situation)
>: to say "Yes, damn sure! ;-)"
>
>  Perhaps in this case. However in C (and C++) a warning is almost always
>advisable and should be considered as an error message (this is what they
>have taught me and this is what I have seen by experience).

In general I agree with you.
Only sometimes warnings are just that. Especially this "union with only one
object" warning. I always felt it was rather useless. I can almost see how
this warning would have never been programmed if the programmer who did it
had felt a little less careful/paranoid that day ;-)

I once had a C++ project where there always showed up 2 warnings which I
knew exactly what they came from and why I could safely ignore them. After
some time I had grown fond of these two warnings ;-) and not seeing them
after a compile gave me a feeling of wrongness...

Anyway: Most C/C++ compilers allow you to specify warning-levels. For
example Visual C++ has 4 (I think) with 2 being the standard and 4 the most
restrictive. So by choosing (or agreeing) to the standard level of 2 I
actually say: Yes, I know there would have been additional warnings if I had
chosen level 4, but I am sure that I can ignore them...

Johannes.


Post a reply to this message

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