This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to document wide string representation
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Patch to document wide string representation
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sat, 31 Mar 2001 17:53:16 +0100 (BST)
This patch adds documentation of wide string representation to
c-tree.texi. It passes "make info". OK to commit to mainline and
branch?
2001-03-31 Joseph S. Myers <jsm28@cam.ac.uk>
* c-tree.texi: Document representation of wide strings.
--- c-tree.texi.orig Tue Jan 23 18:45:20 2001
+++ c-tree.texi Sat Mar 31 16:44:17 2001
@@ -1868,7 +1868,15 @@
@code{TREE_STRING_LENGTH} includes the trailing @code{NUL} if it is
present.
-FIXME: How are wide strings represented?
+For wide string constants, the @code{TREE_STRING_LENGTH} is the number
+of wide characters in the string, and the @code{TREE_STRING_POINTER}
+points to an array of the bytes of the string, as represented on the
+target system (that is, as integers in the target endianness). Wide and
+non-wide string constants are distinguished only by the @code{TREE_TYPE}
+of the @code{STRING_CST}.
+
+FIXME: The formats of string constants are not well-defined when the
+target system bytes are not the same width as host system bytes.
@item PTRMEM_CST
These nodes are used to represent pointer-to-member constants. The
--
Joseph S. Myers
jsm28@cam.ac.uk