re PR c++/52654 ([C++11] Warn on overflow in user-defined literals)
authorEd Smith-Rowland <3dw4rd@verizon.net>
Thu, 29 Nov 2012 02:30:44 +0000 (02:30 +0000)
committerEdward Smith-Rowland <emsr@gcc.gnu.org>
Thu, 29 Nov 2012 02:30:44 +0000 (02:30 +0000)
commit2d7aa5780cebd11f16917ca3983cfd65b457317a
tree82d134dee495ddba8519c473b5cbfa7009581d18
parent48ac1c945b6960be0f88ed15d6f17ae4788d58db
re PR c++/52654 ([C++11] Warn on overflow in user-defined literals)

gcc/c-family/

2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

PR c++/52654
* c-common.h (overflow_type): New enum.
(build_userdef_literal): Add overflow_type argument.
(tree_userdef_literal): Add overflow_type.
(USERDEF_LITERAL_OVERFLOW): New access macro.
* c-common.c (build_userdef_literal): Add overflow_type
argument.
* c-lex.c (c_lex_with_flags): Add overflow_type to
build_userdef_literal calls.
(interpret_integer, interpret_float): Add overflow_type argument.

gcc/cp/

2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

PR c++/52654
* parser.c (cp_parser_string_literal): Add overflow_type arg.
(cp_parser_userdef_numeric_literal): Warn on numeric overflow.

gcc/testsuite/

2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

PR c++/52654
* g++.dg/cpp0x/udlit-overflow.C: New.
* g++.dg/cpp0x/udlit-overflow-neg.C: New.

From-SVN: r193918
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c-family/c-lex.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C [new file with mode: 0644]