This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] to bfd: K&R C fix
- To: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Subject: Re: [patch] to bfd: K&R C fix
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 11 Sep 2000 10:07:43 -0600
- cc: binutils at sources dot redhat dot com
- Reply-To: law at cygnus dot com
In message <0009110342.AA10606@ivan.Harhan.ORG>you write:
> Hi there,
>
> bfd/elf.c fails to compile on 4.3BSD because automatic array debug_sec_name
> s in
> function _bfd_elf_make_section_from_shdr is initialised, and K&R C does not
> allow automatic aggregate initialisation. However, the debug_sec_names arra
> y is
> constant, so making it static both fixes the problem and makes it more
> efficient. The patch is below.
>
> --
> Michael Sokolov Harhan Engineering Laboratory
> Public Service Agent International Free Computing Task Force
> International Engineering and Science Task Force
> 615 N GOOD LATIMER EXPY STE #4
> DALLAS TX 75204-5852 USA
>
> Phone: +1-214-824-7693 (Harhan Eng Lab office)
> E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)
>
> 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
>
> * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names static.
I'd prefer to keep it an auto variable and just initialize it in a K&R
friendly way.
jeff