Re: [PATCH 7/7] teach sparse about C17

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

 



On Sun, Dec 01, 2019 at 04:25:30PM +0000, Ramsay Jones wrote:
> On 28/11/2019 20:42, Luc Van Oostenryck wrote:
> > No real support is done here (or is needed) but the __STDC_VERSION__
> > will return the correct value.
> > 
> > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> > ---
> >  lib.c | 13 +++++++++++++
> >  lib.h |  2 ++
> >  2 files changed, 15 insertions(+)
> > 
> > diff --git a/lib.c b/lib.c
> > index 7f7ca846b..8fddae450 100644
> > --- a/lib.c
> > +++ b/lib.c
> > @@ -1079,6 +1079,15 @@ static char **handle_switch_s(const char *arg, char **next)
> >  		else if (!strcmp(arg, "gnu11"))
> >  			standard = STANDARD_GNU11;
> >  
> > +		else if (!strcmp(arg, "c17") ||
> > +			 !strcmp(arg, "c18") ||
> > +			 !strcmp(arg, "iso9899:2017") ||
> > +			 !strcmp(arg, "iso9899:2018"))
> > +			standard = STANDARD_C17;
> > +		else if (!strcmp(arg, "gnu17") ||
> > +			 !strcmp(arg, "gnu18"))
> > +			standard = STANDARD_GNU17;
> > +
> 
> Yes, I knew about C17, but out of nowhere I started hearing
> about C18! ;-) As far as I can tell, this is just C17, but
> because it crept into 2018 before final approval, come people
> are starting to call it C18. However, the __STDC_VERSION__
> value is still 201710L, right?

Yes, exactly. It's essentially a 'bug-fix' only version, so
nothing new and nothing controversial and so there is very few
reasons to talk about it. I think that the final approval vote
was still in 2017 but it was only published months later, in 2018. 
I think it's better known as C18 but I tend to call it C17 because
of the __STDC_VERSION__.

Best regards,
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux