On Nov 1, 2006, at 12:16 PM, Dave Hansen wrote:

From: Simon Han <[EMAIL PROTECTED]>
[...]
To reply my own question.  :-)

The problem is that gcc does sign extension to the value.
Changing to value less than 0x7fe fixed the problem.

Simon

On Oct 31, 2006, at 9:30 PM, Simon Han wrote:

Hi all,

        I am trying to call functions with hard coded address as follow.

typedef void (*func_type)( void );

((func_type) 0x1D400)();

If this is the case, you should also be able to solve the problem by specifying the address as unsigned, e.g.

  ((func_type) 0x1D400U)();

Note the 'U' suffix.  Haven't tried it, though...

Regards,

  -=Dave

Hi Dave,

        I tried both 'U' and 'UL'.  Both cases compiled to the same error.
        BTW, I am using atmega128

Simon



_________________________________________________________________
Get today's hot entertainment gossip http://movies.msn.com/movies/ hotgossip?icid=T002MSN03A07001




_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to