libcpp:
commit30b1ba428c325867d8314c21ce159e207b4b6d9f
authoremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2015 12:58:48 +0000 (30 12:58 +0000)
committeremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2015 12:58:48 +0000 (30 12:58 +0000)
tree8b22f058594c24d03fcb8f25908876f4764a4e03
parent168a6cd2692428e03a4f4f45e24ca6ab380c2cbb
libcpp:

2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>

Implement N4197 - Adding u8 character literals
* include/cpplib.h (UTF8CHAR, UTF8CHAR_USERDEF): New cpp tokens;
(struct cpp_options): Add utf8_char_literals.
* init.c (struct lang_flags): Add utf8_char_literals;
(struct lang_flags lang_defaults): Add column for utf8_char_literals.
* macro.c (stringify_arg()): Treat CPP_UTF8CHAR token;
* expr.c (cpp_userdef_char_remove_type(), cpp_userdef_char_add_type()):
Treat CPP_UTF8CHAR_USERDEF, CPP_UTF8CHAR tokens;
(cpp_userdef_char_p()): Treat CPP_UTF8CHAR_USERDEF token;
(eval_token(), _cpp_parse_expr()): Treat CPP_UTF8CHAR token.
* lex.c (lex_string(), _cpp_lex_direct()): Include CPP_UTF8CHAR tokens.
* charset.c (converter_for_type(), cpp_interpret_charconst()):
Treat CPP_UTF8CHAR token.

gcc/c-family:

2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>

Implement N4197 - Adding u8 character literals
* c-family/c-ada-spec.c (print_ada_macros()): Treat CPP_UTF8CHAR
like CPP_CHAR.
* c-family/c-common.c (c_parse_error()): print CPP_UTF8CHAR
and CPP_UTF8CHAR_USERDEF tokens.
* c-family/c-lex.c (c_lex_with_flags()): Treat CPP_UTF8CHAR_USERDEF
and CPP_UTF8CHAR tokens; (lex_charconst()): Treat CPP_UTF8CHAR token.

gcc/cp:

2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>

Implement N4197 - Adding u8 character literals
* parser.c (cp_parser_primary_expression()): Treat CPP_UTF8CHAR
and CPP_UTF8CHAR_USERDEF tokens;
(cp_parser_parenthesized_expression_list()): Treat CPP_UTF8CHAR token.

gcc/testsuite:

2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>

Implement N4197 - Adding u8 character literals
* g++.dg/cpp1z/utf8.C: New.
* g++.dg/cpp1z/utf8-neg.C: New.
* g++.dg/cpp1z/udlit-utf8char.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225185 138bc75d-0d04-0410-961f-82ee72b054a4
17 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
gcc/c-family/c-common.c
gcc/c-family/c-lex.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/udlit-utf8char.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/utf8-neg.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/utf8.C [new file with mode: 0644]
libcpp/ChangeLog
libcpp/charset.c
libcpp/expr.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/lex.c
libcpp/macro.c