diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-02-24 12:52:30 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-02-24 12:52:30 +0000 |
commit | a47ed31052e27000eb57521bb4c9e600a4768a98 (patch) | |
tree | b8bc66887f2c3523f7edef448ecb1be8ff9d481a /gcc/cppexp.c | |
parent | cb8f73be28c7ad42f8244cc9e442c7559d39f725 (diff) | |
download | gcc-a47ed31052e27000eb57521bb4c9e600a4768a98.zip gcc-a47ed31052e27000eb57521bb4c9e600a4768a98.tar.gz gcc-a47ed31052e27000eb57521bb4c9e600a4768a98.tar.bz2 |
cpplex.c (cpp_interpret_charconst): Get signedness or otherwise of wide character constants correct.
* cpplex.c (cpp_interpret_charconst): Get signedness or
otherwise of wide character constants correct.
* cppexp.c (lex): Get signedness of wide charconsts correct.
* testsuite/gcc.dg/cpp/wchar-1.c: New test.
From-SVN: r50005
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 1f225c3..1d4cecc 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -293,8 +293,10 @@ lex (pfile, skip_evaluation) { unsigned int chars_seen; - /* This is always a signed type. */ - op.unsignedp = 0; + if (token->type == CPP_CHAR) + op.unsignedp = 0; + else + op.unsignedp = WCHAR_UNSIGNED; op.op = CPP_NUMBER; op.value = cpp_interpret_charconst (pfile, token, 1, 0, &chars_seen); return op; |