Strange :( Same here with sdcc-3.0.0. Should be reported as a bug.

However, it is not severe. You can always remove the type-casting and
successfully compile your code.

Krish

On Tue, Apr 5, 2011 at 9:40 AM, Bob Frankel <bios.bob.fran...@gmail.com> wrote:
> consider the following program, which initializes a static structure
> containing a function-pointer-valued field....
>
> typedef void (*Fxn)();
>
> struct S {
>     Fxn f;
> };
>
> void fxn() {
> }
>
> struct S s = {
>     (Fxn)fxn            /* raises error when compiled with --model-large !!!
> */
> };
>
>
> when i compile this code with --model-medium, everything works fine....  but
> when i compile with --model-large, the initializer causes a compiler
> error....   note also that the problem goes away when the function cast is
> removed!!!   again, everything works just fine in with --model-medium....
>
> any ideas???
>
> thanks in advance
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
>

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to