[Patch bfd] Remove unneeded comma expression from bfd_set_section_userdata, bfd_set_section_alignment, bfd_set_section_vma
Ramana Radhakrishnan
ramrad01@arm.com
Mon Jan 27 15:56:00 GMT 2014
On 27/01/14 11:30, Ramana Radhakrishnan wrote:
> Hi,
>
> Our auto-tester of binutils with trunk gcc failed this morning with the
> following.
>
> In file included from src/binutils-gdb/gas
> /as.h:95:0,
> from src/binutils-gdb/gas/subsegs.c:25:
> src/binutils-gdb/gas/subsegs.c: In function 'subseg_change':
> ../bfd/bfd.h:304:75: error: right-hand operand of comma expression has
> no effect [-Werror=unused-value]
> #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata =
> (val)),TRUE)
>
> ^
> src/binutils-gdb/gas/subsegs.c:70:7: note: in expansion of macro
> 'bfd_set_section_userdata'
> bfd_set_section_userdata (stdoutput, seg, seginfo);
> ^
> src/binutils-gdb/gas/subsegs.c: In function 'subseg_get':
> ../bfd/bfd.h:304:75: error: right-hand operand of comma expression has
> no effect [-Werror=unused-value]
> #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata =
> (val)),TRUE)
>
> ^
> src/binutils-gdb/gas/subsegs.c:172:7: note: in expansion of macro
> 'bfd_set_section_userdata'
> bfd_set_section_userdata (stdoutput, secptr, seginfo);
>
>
> bfd_set_section_vma and bfd_set_section_alignment also appear to be
> similarly afflicted as I worked through the problem.
>
> I notice additional changes in bfd-in2.h after regeneration but this
> appears to fix the build issue.
>
> Tested with arm-linux-gnueabihf cross and no regressions.
Uggh, it looks like I didn't test when the hunks included
bfd_set_section_vma and bfd_set_section_alignment because this expects
the TRUE to be meaningful and uses that in conditions in a number of places.
The problem though is real and builds appear to be broken with trunk gcc.
Patch withdrawn currently.
regards
ramana
>
> Ok to commit ?
>
> Cheers,
> Ramana
>
>
> * bfd/bfd-in.h (bfd_set_section_userdata): Fix definition.
> (bfd_set_section_alignment): Likewise.
> (bfd_set_section_vma): Likewise.
> * bfd/bfd-in2.h: Regenerate.
More information about the Binutils
mailing list