#209 Error passing struct[ ] as argument

closed-fixed
nobody
None
5
2013-05-25
2001-11-04
Marc Nijweide
No

/* testcase */

typedef struct {
int foo;
int bar;
} MyStruct;

extern void func( const MyStruct list[] );

const MyStruct my_list[] = {
{ 1, 2 },
{ 3, 4 } };

void main( void ) {
func( my_list );
}

Fails with error:
test1.c(15):error *** incompatible types
from type 'code const struct __00010000 [] '
to type 'const struct __00010000 near *'
test1.c(15):error *** code not generated for 'main'
due to previous errors

Tested with SDCC MingW snapshot 2001.11.04
sdcc -mz80 -c

Discussion

  • Sandeep Dutta
    Sandeep Dutta
    2001-11-04

    Logged In: YES
    user_id=1551

    Fixed.

     
  • Sandeep Dutta
    Sandeep Dutta
    2001-11-04

    • milestone: --> fixed
    • status: open --> closed-fixed