[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-strtod: improve error checking
From: |
Bruno Haible |
Subject: |
Re: c-strtod: improve error checking |
Date: |
Wed, 21 Jan 2009 23:39:19 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Jim,
> I prefer to avoid casts, so please use this test instead:
>
> if (!c_locale)
If you prefer this way. I committed it like you say.
> > + c_locale = newlocale (LC_ALL_MASK, "C", (locale_t)0);
>
> I suppose NULL isn't necessarily defined
POSIX explicitly mentions (locale_t)0. I suppose it's because it's not
specified whether locale_t is an integral type or a pointer type. For this
reason, writing NULL could lead to gcc warnings (if locale_t is an integral
type).
Bruno
- c-strtod: improve error checking, Bruno Haible, 2009/01/21
- Re: c-strtod: improve error checking, Paolo Bonzini, 2009/01/21
- Re: c-strtod: improve error checking, Jim Meyering, 2009/01/21
- Re: c-strtod: improve error checking,
Bruno Haible <=
- Re: c-strtod: improve error checking, Karl Berry, 2009/01/21
- Re: c-strtod: improve error checking, Peter Seebach, 2009/01/21
- Re: c-strtod: improve error checking, Simon Josefsson, 2009/01/21
- Re: NULL macro, Bruno Haible, 2009/01/21
- Re: NULL macro, Simon Josefsson, 2009/01/21