This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Require C99 for bfd


On 29.01.2020 15:08, cbiesinger@chromium.org wrote:
> From: Christian Biesinger <cbiesinger@google.com>
> 
> This allows writing more modern code, such as not having to declare all
> variables at the top of a block.
> 
> See also discussion at:
> https://sourceware.org/ml/binutils/2020-01/threads.html#00334
> 
> Unfortunately, because of how the toplevel Makefile works, we have to
> override CC for this to work.  gnulib/Makefile.am already has a workaround
> for this issue.
> 
> My patch to fix this in the toplevel makefile has not gotten any attention
> so far:
> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02237.html
> 
> bfd/ChangeLog:
> 
> 2020-01-29  Christian Biesinger  <cbiesinger@google.com>
> 
> 	* Makefile.am: Override CC to what configure detected.
> 	* Makefile.in: Regenerate.
> 	* configure: Regenerate.
> 	* configure.ac: Turn on C99 mode.

I'm not convinced of the move, but I'm also not in the position to
argue against it. However, I think precautions should be taken to
prevent headers of libraries made available for external consumption
to require use of C99 as well - C89 ought to remain sufficient for
them. In the Xen Project we make a wee attempt at something similar
(https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/Makefile;hb=refs/heads/staging),
to (hopefully) avoid gaining dependencies on gcc extensions. Maybe
something similar could be done here (unless there is something
like this already, and I'm simply unaware)?

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]