avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Function pointer problem


From: Thomas Olsson
Subject: Re: [avr-gcc-list] Function pointer problem
Date: Sat, 2 Oct 2004 20:13:04 +0200

In article <address@hidden>, gouy yann
<URL:mailto:address@hidden> wrote:
> the value is correct.

Yes, I did not know the instruction encoding format, so didn't realise that
the address is stored shifted.

The code in question doesn't work, but obviously there must be some other
explanation than this.

> concerning the optimisation done by GCC, it seems
> perfectly correct as what you do is to call
> code_test(1).

Yes, it's entirely correct, and I should have more faith in GCC :-)

I still haven't quite got my head round the specification of "progmem" and
what exactly the attribute applies to at any given place in a declaration.
If anyone has a useful link to a description of this I would be grateful
(the GCC manual doesn't contain that particular attribute).

Thanks to all that replied :-)

Regards,
Thomas

-- 
        9876543210  Magic tab-o-meter.          http://www.armware.dk/
         ^



reply via email to

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