parser.c (cp_parser_constant_expression): Set non_integral_constant_expression correc...
authorJason Merrill <jason@redhat.com>
Fri, 25 Feb 2011 06:22:51 +0000 (01:22 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 25 Feb 2011 06:22:51 +0000 (01:22 -0500)
commit4be5e5b12d501cb3aae673e673c30363b32480df
tree49b81324ade09d98696d503e866b68909cbe56f6
parent8da6ac3b5b71b1bb2d7c1883e7ab3ac05e6e8366
parser.c (cp_parser_constant_expression): Set non_integral_constant_expression correctly for C++0x too.

* parser.c (cp_parser_constant_expression): Set
non_integral_constant_expression correctly for C++0x too.
(cp_parser_static_assert): Allow non-constant expression.
(cp_parser_direct_declarator): Expect non_constant_p to be set
properly for C++0x.
* pt.c (value_dependent_expression_p): Handle TYPEID_EXPR.
* semantics.c (maybe_constant_value): Check type_unknown_p too.
(potential_rvalue_constant_expression): New.
(require_potential_rvalue_constant_expression): New.

From-SVN: r170488
12 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/regress/parse-ambig5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C
gcc/testsuite/g++.dg/cpp0x/variadic20.C