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

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

Re: [avr-gcc-list] What is the proper cast for reading a table of pointe


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] What is the proper cast for reading a table of pointers to functions from Flash?
Date: Fri, 20 Jul 2007 23:28:50 +0200 (MET DST)

"Bob Paddock" <address@hidden> wrote:

> "ISO C forbids assignment between function pointer and `void *'"

Yep, for example, IAR GCC would not compile that at all as I recently
noticed.

> static uint8_t (*state_function_ptr)(void);

state_function_ptr = (uint8_t (*)(void))
     pgm_read_word( &menu_state[current_state_u8].FunctionPointer );

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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