Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #43254

Re: wchar_t: signed or unsigned?

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: wchar_t: signed or unsigned?
Date 2014-04-21 16:48 -0400
Organization Self
Message-ID <53558432.2040807@verizon.net> (permalink)
References <4cial9tecgiks7ov2q3c1oo53492kvf3ti@4ax.com> <lj3v1q$otu$1@dont-email.me>

Show all headers | View raw


On 04/21/2014 04:28 PM, Stephen Sprunk wrote:
...
> N1570 7.19p2 says wchar_t "is an integer type whose range of values can
> represent distinct codes for all members of the largest extended
> character set specified among the supported locales; the null character
> shall have the code value zero."
> 
> N1570 7.20.3p4 says "If wchar_t (see 7.19) is defined as a signed
> integer type, the value of WCHAR_MIN shall be no greater than −127 and
> the value of WCHAR_MAX shall be no less than 127; otherwise, wchar_t is
> defined as an unsigned integer type, and the value of WCHAR_MIN shall be
> 0 and the value of WCHAR_MAX shall be no less than 255."
> 
> So, whether wchar_t is signed or unsigned is implementation-defined,
> just like with plain char.

You posted that message slightly less than 2 hours after my message, in
which I argued (based upon precisely those two clauses) that while the
value of WCHAR_MIN is implementation-defined, and that value does
uniquely determine the signedness of wchar_t, a conforming
implementation is not required to more explicitly document that
signedness. Are we in disagreement on that point?

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

wchar_t: signed or unsigned? DSF <notavalid@address.here> - 2014-04-21 12:55 -0400
  Re: wchar_t: signed or unsigned? Xavier Roche <xroche@free.fr.NOSPAM.invalid> - 2014-04-21 20:02 +0200
  Re: wchar_t: signed or unsigned? Seungbeom Kim <musiphil@bawi.org> - 2014-04-21 11:07 -0700
    Re: wchar_t: signed or unsigned? Keith Thompson <kst-u@mib.org> - 2014-04-21 11:24 -0700
      Re: wchar_t: signed or unsigned? Seungbeom Kim <musiphil@bawi.org> - 2014-04-21 11:57 -0700
        Re: wchar_t: signed or unsigned? James Kuyper <jameskuyper@verizon.net> - 2014-04-21 15:13 -0400
  Re: wchar_t: signed or unsigned? James Kuyper <jameskuyper@verizon.net> - 2014-04-21 14:31 -0400
  Re: wchar_t: signed or unsigned? Stephen Sprunk <stephen@sprunk.org> - 2014-04-21 15:28 -0500
    Re: wchar_t: signed or unsigned? James Kuyper <jameskuyper@verizon.net> - 2014-04-21 16:48 -0400
      Re: wchar_t: signed or unsigned? Keith Thompson <kst-u@mib.org> - 2014-04-21 14:08 -0700
  Re: wchar_t: signed or unsigned? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2014-04-22 03:21 -0700
    Re: wchar_t: signed or unsigned? Stephen Sprunk <stephen@sprunk.org> - 2014-04-22 10:48 -0500
    Re: wchar_t: signed or unsigned? Keith Thompson <kst-u@mib.org> - 2014-04-22 09:10 -0700
  Re: wchar_t: signed or unsigned? gordonb.8ql82@burditt.org (Gordon Burditt) - 2014-04-23 03:31 -0500
    Re: wchar_t: signed or unsigned? Stephen Sprunk <stephen@sprunk.org> - 2014-04-25 10:00 -0500
      Re: wchar_t: signed or unsigned? Keith Thompson <kst-u@mib.org> - 2014-04-25 09:00 -0700
        Re: wchar_t: signed or unsigned? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2014-04-25 10:27 -0700
        Re: wchar_t: signed or unsigned? Stephen Sprunk <stephen@sprunk.org> - 2014-04-25 16:43 -0500

csiph-web