[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAnimation...

From: Gregory John Casamento
Subject: Re: NSAnimation...
Date: Tue, 10 Apr 2007 06:07:20 -0700 (PDT)


The "static INLINE" really isn't beneficial, since the function is only used as 
a function pointer by NSArray to sort it's contents.    

The only time that the compiler can do some optimization is when the function 
is called directly.  The compiler will replace the call with the instructions 
for that function and eliminate the function call from the resulting machine 
code and then proceed to optimize that along with the surrounding code.   But 
that can't happen here, since the function is referred to by a pointer.   The 
compiler can't know at compile-time if the function pointer will change, so no 
optimization can be done anyway.

I agree that it's a bug in GCC 4.1.1, but we should still try to keep it 
working on GCC 4.1.1, if we can.

Later, GJC
Gregory Casamento

----- Original Message ----
From: Xavier Glattard <address@hidden>
To: address@hidden
Sent: Tuesday, April 10, 2007 3:39:59 AM
Subject: Re: NSAnimation...

Fred Kiefer <fredkiefer <at>> writes:

> Gregory John Casamento wrote:
> > With a clean checkout and a clean install, I still get this:
> > 
> >   Compiling file set_show_service.m ...
> >  Linking tool set_show_service ...
> > ../Source/./obj/ undefined reference to
> > collect2: ld returned 1 exit status
> I had a look at the code and perhaps it helps to remove the "static
> INLINE" declaration for this function. Marking it as inline does surely
> not help, when it is only used as a function pointer. 

I wrote that with the hope the compiler might do some optimization here,
as the function pointer is used in an inline function...

I think it might be a GCC 4.1.1 bug : i just tried with mingw-gcc3.4.2 
and it compiles without error.



Gnustep-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]