summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-03 11:59:26 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-03 11:59:26 +0000
commit49a657d98f5b56b3b469163be89e220657cac92a (patch)
tree1520bfcfc1cca9e314890ea375efe86771b5799e /libcpp
parenta4efa7dcd66f6ebb3d055098c610590085cc1f15 (diff)
downloadgcc-49a657d98f5b56b3b469163be89e220657cac92a.tar.gz
libcpp:
* charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte UTF-8 sequences. gcc/testsuite: * gcc.dg/cpp/utf8-5byte-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147073 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/charset.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 24f3f8debcf..a541b69211c 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-03 Joseph Myers <joseph@codesourcery.com>
+
+ * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte
+ UTF-8 sequences.
+
2009-04-25 Joseph Myers <joseph@codesourcery.com>
PR preprocessor/39559
diff --git a/libcpp/charset.c b/libcpp/charset.c
index e743b1e277f..f1da4265ddd 100644
--- a/libcpp/charset.c
+++ b/libcpp/charset.c
@@ -169,7 +169,7 @@ static inline int
one_utf8_to_cppchar (const uchar **inbufp, size_t *inbytesleftp,
cppchar_t *cp)
{
- static const uchar masks[6] = { 0x7F, 0x1F, 0x0F, 0x07, 0x02, 0x01 };
+ static const uchar masks[6] = { 0x7F, 0x1F, 0x0F, 0x07, 0x03, 0x01 };
static const uchar patns[6] = { 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
cppchar_t c;