[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Improving in leaps and skips!
From: |
Richard Urwin |
Subject: |
Re: [avr-gcc-list] Improving in leaps and skips! |
Date: |
Wed, 2 Mar 2005 22:24:18 +0000 |
User-agent: |
KMail/1.5.3 |
On Tuesday 01 Mar 2005 7:45 pm, E. Weddington wrote:
> Björn Haase wrote:
> >int
> >foo3 ( int func(int), int a)
> >{ return a + a * func (27);
> >}
> >
> >void
> >foo (int a, int b)
> >{
> > int
> > foo2 (int c)
> > { return c + b;
> > }
> >
> > return foo3 (&foo2, a);
> >}
> >
> >is considered to be legal code for gcc. The avr port does presently
> > lack support for this extension.
>
> Bleah. :-P
> I wouldn't even know why that would even be used.
Say you're calling a sort routine that uses a function parameter to do
the comparison. Instead of muddying file scope with a function that
does the comparison, you can put it inside the function that calls the
sort routine.
void foo ()
{
int a[...], b[...];
bool compint(int a, int b) {return a > b;}
...
sort (a, b, sizeof(a[0]), compint);
...
}
--
Richard Urwin
- Re: [avr-gcc-list] Improving in leaps and skips!, (continued)
- Re: [avr-gcc-list] Improving in leaps and skips!, E. Weddington, 2005/03/02
- Re: [avr-gcc-list] Improving in leaps and skips!, Rolf Ebert, 2005/03/02
- Re: [avr-gcc-list] Improving in leaps and skips!, Björn Haase, 2005/03/02
- Re: [avr-gcc-list] Improving in leaps and skips!, Rolf Ebert, 2005/03/13
- Re: [avr-gcc-list] Improving in leaps and skips!, Marek Michalkiewicz, 2005/03/13
- Re: [avr-gcc-list] Improving in leaps and skips!, Jeff Barlow, 2005/03/13
- Re: [avr-gcc-list] Improving in leaps and skips!, Ben L. Titzer, 2005/03/15
- Re: [avr-gcc-list] Improving in leaps and skips!, E. Weddington, 2005/03/14
- Re: [avr-gcc-list] Improving in leaps and skips!, Ben L. Titzer, 2005/03/15
- Re: [avr-gcc-list] Improving in leaps and skips!, E. Weddington, 2005/03/14
- Re: [avr-gcc-list] Improving in leaps and skips!,
Richard Urwin <=
- Re: [avr-gcc-list] Improving in leaps and skips!, E. Weddington, 2005/03/02
- Re: [avr-gcc-list] Improving in leaps and skips!, Joerg Wunsch, 2005/03/03
- [avr-gcc-list] Locating Internal /External Memory Sections, Jim Davis, 2005/03/14
- Re: [avr-gcc-list] Locating Internal /External Memory Sections, Joerg Wunsch, 2005/03/14
[avr-gcc-list] Testsuite adaptions: Intermediate results, Björn Haase, 2005/03/06