This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: somread.c:480: invalid lvalue in assignment
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: somread.c:480: invalid lvalue in assignment
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Fri, 25 Aug 2000 15:57:26 -0400 (EDT)
- Cc: gdb at sourceware dot cygnus dot com
- References: <200008251914.PAA11706@hiauly1.hia.nrc.ca>
John David Anglin writes:
> Building the current CVS version of gdb under hpux 10.20 fails here:
>
> gcc -c -O3 -D__HP_CURSES -I. -I. -I./config -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized somread.c
> somread.c: In function `som_symfile_read':
> somread.c:362: warning: implicit declaration of function `init_import_symbols'
> somread.c: In function `som_symfile_offsets':
> somread.c:480: invalid lvalue in assignment
> make[1]: *** [somread.o] Error 1
> make[1]: Leaving directory `/xxx/gnu/gdb-5.0/gdb'
> make: *** [all-gdb] Error 2
>
> The offending line is:
>
> for (i = 0; i < SECT_OFF_MAX; i++)
> ANOFFSET (objfile->section_offsets, i) = text_addr;
>
> Dave
> --
> J. David Anglin dave.anglin@nrc.ca
> National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
Oops, my fault. Thanks for pointing it out.
I'll commit a patch asap.
In the meantime you should change the line like this:
- ANOFFSET (objfile->section_offsets, i) = text_addr;
+ (objfile->section_offsets)->offsets[i] = text_addr;
I'll get a proper patch in before the end of the day.
Elena