counting characters in string constants

Geoff Keating geoffk@geoffk.org
Sat Dec 2 14:13:00 GMT 2000


> Date: Sat, 2 Dec 2000 00:54:42 +0000 (GMT)
> From: "Joseph S. Myers" <jsm28@cam.ac.uk>
> cc: <gcc-patches@gcc.gnu.org>
> 
> On Fri, 1 Dec 2000, Geoff Keating wrote:
> 
> > ISO C doesn't count the trailing zero byte in a string
> > literal, as it is not a character.
> 
> Any idea how multibyte characters should be counted?  This didn't seem
> totally clear when I examined this area of the standards in June.

I suspect they count as one; if the standard had meant bytes, it would
have said so.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


More information about the Gcc-patches mailing list