POV-Ray : Newsgroups : povray.programming : Problems Compiling POV 3.01 with Visual C++ 5.0 : Re: Problems Compiling POV 3.01 with Visual C++ 5.0 Server Time
29 Jul 2024 06:17:00 EDT (-0400)
  Re: Problems Compiling POV 3.01 with Visual C++ 5.0  
From: Vahur Krouverk
Date: 30 Jul 1998 15:00:56
Message: <35C0B4F9.3CC2FA8@fv.aetec.ee>
Ron Parker wrote:

> >Which project target type You have (debug or release)? I had some problems,
> >when I tried to compile release version with maximum speed optimization: e.g.
> >function splitfn in file pvmisc.c produced incorrect result (input parameter
> >filename was modified within function; if I used local variable instead of it,
> >all  worked OK). (target could be set from Project/settings menu).
>
> Does SP3 fix this optimization error?

SP3? Do You mean by it Service Pack for NT? In that case I have it and it didn't
help. Or do You mean some VC++ fixes?
Actually I'm not surprised by the erroneous result of optimizations; I'm afraid that
all  C++ compilers behave more or less oddly in that case. Language itself is
complex and big and optimizations make it even harder to produce correct result.
When I encountered this error, then I had all possible optimizations for speed and
forced inlining of small functions.
Additionally, function itself (splitfn) is not good written one from my point of
view:  6+ years of C/C++ coding have taught me to be conservative and esteem code,
which is simple and without tricks, but this function uses input parameter as
variable and modifies it, instead of using local variable. If code is tricky, then
it is hard for human to understand and there is possibility for compiler to stumble
as well.


Post a reply to this message

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