POV-Ray : Newsgroups : povray.programming : isosurf.cpp / inline & gcc : Re: isosurf.cpp / inline & gcc Server Time
19 Oct 2024 17:57:54 EDT (-0400)
  Re: isosurf.cpp / inline & gcc  
From: Mael
Date: 21 Mar 2003 03:18:44
Message: <3e7acae4$1@news.povray.org>
> WAIT. Because it seems you [Mael] are using an outdated version of gcc.

g++ -v
version gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

I'm by no mean a gcc expert but try the following :

g++ -S -O2 -Winline -Wno-multichar -c isosurf.cpp
grep Evaluate_Function isosurf.s
 call _Z17Evaluate_FunctionjPd
 call _Z17Evaluate_FunctionjPd
 call _Z17Evaluate_FunctionjPd
 call _Z17Evaluate_FunctionjPd
 call _Z17Evaluate_FunctionjPd
 call _Z17Evaluate_FunctionjPd
 .section .gnu.linkonce.t._Z17Evaluate_FunctionjPd,"ax",@progbits
 .weak _Z17Evaluate_FunctionjPd
 .type _Z17Evaluate_FunctionjPd,@function
_Z17Evaluate_FunctionjPd:
 .size _Z17Evaluate_FunctionjPd,.Lfe17-_Z17Evaluate_FunctionjPd

then move the inline functions at beginning of file..

g++ -S -O2 -Winline -Wno-multichar -c isosurf.cpp
grep Evaluate_Function isosurf.s
(nothing)

I think that -Winline will warn if the function cannot be inlined (looking
at gcc doc this can happen for example if it uses varargs), but here the
functions *are* inlinable(? :)

M


Post a reply to this message

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