<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 912</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="912"></A><H4>912.
  
Character literals and <I>universal-character-name</I>s
</H4>
<B>Section: </B>5.13.3&#160; [<A href="https://wg21.link/lex.ccon">lex.ccon</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD3
 &#160;&#160;&#160;

 <B>Submitter: </B>Alisdair Meredith
 &#160;&#160;&#160;

 <B>Date: </B>7 June, 2009<BR>


<P>[Moved to DR at the October, 2012 meeting.]</P>

<P>According to 5.13.3 [<A href="https://wg21.link/lex.ccon#1">lex.ccon</A>] paragraph 1,</P>

<BLOCKQUOTE>

A character literal that does not begin with <TT>u</TT>, <TT>U</TT>,
or <TT>L</TT> is an ordinary character literal, also referred to as a
narrow-character literal.  An ordinary character literal that contains
a single <I>c-char</I> has type <TT>char</TT>, with value equal to the
numerical value of the encoding of the c-char in the execution
character set.

</BLOCKQUOTE>

<P>However, the definition of <I>c-char</I> includes as one
possibility a <I>universal-character-name</I>.  The value of a
<I>universal-character-name</I> cannot, in general, be represented
as a <TT>char</TT>, so this specification is impossible to
satisfy.</P>

<P>(See also <A HREF="411.html">issue 411</A> for related
questions.)</P>

<P><B>Additional note (February, 2012):</B></P>

<P>See the discussion in <A HREF="1422.html">issue 1422</A> for a
possible interpretation of the existing text.</P>

<P><B>Proposed resolution (February, 2012):</B></P>

<P>Change 5.13.3 [<A href="https://wg21.link/lex.ccon#1">lex.ccon</A>] paragraph 1 as follows:</P>

<BLOCKQUOTE>

...A character literal that does not begin with <TT>u</TT>,
<TT>U</TT>, or <TT>L</TT> is an ordinary character literal, also
referred to as a narrow-character literal.  An ordinary character
literal that contains a single <I>c-char</I> <INS>representable in
the execution character set</INS> has type <TT>char</TT>,
with value equal to the numerical value of the encoding of the
<I>c-char</I> in the execution character set. An ordinary character
literal that contains more than one <I>c-char</I> is a
<I>multicharacter literal</I>.  A multicharacter literal<INS>, or an
ordinary character literal containing a single <I>c-char</I> not
representable in the execution character set, is
conditionally-supported,</INS> has type <TT>int</TT><INS>,</INS> and
<INS>has an</INS> implementation-defined value.

</BLOCKQUOTE>

<P>This resolution also resolves <A HREF="1024.html">issue 1024</A>.</P>

<BR><BR>
</BODY>
</HTML>
