bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mig: explicitly use -std=gnu11


From: Samuel Thibault
Subject: Re: [PATCH] mig: explicitly use -std=gnu11
Date: Fri, 25 Nov 2022 01:07:34 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Amos Jeffries, le jeu. 24 nov. 2022 22:50:57 +1300, a ecrit:
> On 24/11/2022 5:41 am, Flavio Cruz wrote:
> > On Wed, Nov 23, 2022 at 11:51:36AM +0100, Samuel Thibault wrote:
> > > Flavio Cruz, le mer. 23 nov. 2022 00:10:10 -0500, a ecrit:
> > > > Latest GCC will pick up gnu17 by default but gnu11 will be
> > > > better supported with older compilers.
> > > 
> > > Mmm, but why explicitly requesting gnu11 then? Latest GCC will be fine
> > > with using gnu17, and older GCC will be fine with using whatever it
> > > supports.
> > 
> > I would like to modernize some parts of the mig code (for example, use
> > stdbool.h instead of setting up our own boolean type). For this, gnu99
> > would be enough but I thought gnu11 would be fine since it has been
> > around
> > for some time.
> 
> FWIW, From experience with other code using the -std=*11 options:
> This will not just downgrade the specification on latest compilers, but at
> times disable newer code safety checks. Making some types of bugs more
> difficult to detect.

Indeed. We can just declare that our code requires at least gnu11, and
let glibc etc. use gnu17 etc. features whenever the compiler can support
them.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]