]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-lex.c (lex_string): Let cpp_parse_escape handles truncation and sign-extension.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sat, 4 May 2002 07:30:32 +0000 (07:30 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 4 May 2002 07:30:32 +0000 (07:30 +0000)
commit4268e8bb9408758c1c97b6e821ab4c599d794808
tree39e01f86f161ea393ce56f05f0c0a0264050f332
parentac5ec76848ad9634ba9cb93379c3011ebad22c4f
c-lex.c (lex_string): Let cpp_parse_escape handles truncation and sign-extension.

* c-lex.c (lex_string): Let cpp_parse_escape handles truncation
and sign-extension.
(lex_charconst): Update for change in prototype of
cpp_interpret_charconst.  Extend from cppchar_t to HOST_WIDE_INT
appropriately.
* cpphash.h (BITS_PER_CPPCHAR_T): New.
* cppinit.c (cpp_create_reader): Initialize them for no
change in semantics.
(cpp_post_options): Add sanity checks.
* cpplex.c (cpp_parse_escape): Handle precision, sign-extension
and truncation issues.  Calculate in type cppchar_t.
(MAX_CHAR_TYPE_SIZE, MAX_WCHAR_TYPE_SIZE): Remove.
(cpp_interpret_charconst): Calculate in type cppchar_t.  Handle
run-time dependent precision correctly.  Return whether the
result is signed or not.
* cpplib.c (dequote_string): Use cppchar_t; update.
* cpplib.h (cppchar_signed_t): New.
struct cpp_options): New precision members.
(cpp_interpret_charconst, cpp_parse_escape): Update prototypes.

From-SVN: r53152
gcc/ChangeLog
gcc/c-lex.c
gcc/cppexp.c
gcc/cpphash.h
gcc/cppinit.c
gcc/cpplex.c
gcc/cpplib.c
gcc/cpplib.h