This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: GNU C extension introduced in common code
- To: robertl at sco dot com
- Subject: Re: GNU C extension introduced in common code
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 23 Jan 2000 16:29:30 -0500
- CC: nickc at cygnus dot com, twall at tiac dot net, binutils at sourceware dot cygnus dot com
- References: <20000123152003.A7019@rjlhome.sco.com>
Date: Sun, 23 Jan 2000 15:20:03 -0600
From: Robert Lipe <robertl@sco.com>
The patch in:
http://sourceware.cygnus.com/ml/binutils/2000-01/msg00079.html
makes use of a GNU C extension and therefore breaks compilation on other
compilers.
This might be OK if it's a conscious decision to do so, but there probably
needs to be a better justification.
Since we always link against libiberty, Replacing
char buff[bfd_coff_filhsz (abfd)];
with
char *buff = alloca(bfd_coff_filhsz (abfd));
is probably adequate if this really is desirable.
BFD should not use alloca. That is because on a system which does not
provide native support for alloca, the C replacement routine will
crash if memory is not available.
This needs to be fixed to call bfd_malloc.
Ian