/*
Hi,

I'm trying to compile the sample code bellow with sdcc for pic14 target :

$ sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.6.4 #4651 (Feb 25 2007) (UNIX)

but :

$ sdcc -mpic14 -p16f88 whatwrong.c
sdcc: /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/pic/gen.c:9644:
genGenPointerSet: Assertion `size == getSize(validateOpType(result,
"OP_SYM_ETYPE", "result", SYMBOL,
"/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/pic/gen.c",
9644)->operand.symOperand->etype)' failed.
Caught signal 6: SIGABRT

This message is caused by the line : "buffer->len = buffsize ;".

Where I'm wrong ?

Thanks in advance for you help

Stephane.
*/

struct foo
{
     unsigned char pos ;
     unsigned char len ;
} bar ;

void whatwrong( struct foo * buffer, unsigned char buffsize )
{
     buffer->pos = 0 ;
     buffer->len = buffsize ;
}

void main( void )
{
     whatwrong( &bar, 15 );
}


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to