diff options
author | Jason Merrill <jason@redhat.com> | 2020-05-21 10:27:11 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-05-21 18:04:22 -0400 |
commit | beb019d346b903c16b9fd349937de444b6a8b6c0 (patch) | |
tree | 712206ff4c6993253a99a11b9736f06d069f998a /contrib/gcc-changelog/git_commit.py | |
parent | 4f602147b6abbe05f862d3feda8290d4cf5c583f (diff) | |
download | gcc-beb019d346b903c16b9fd349937de444b6a8b6c0.zip gcc-beb019d346b903c16b9fd349937de444b6a8b6c0.tar.gz gcc-beb019d346b903c16b9fd349937de444b6a8b6c0.tar.bz2 |
c++: Constant expression parsing and parameters.
The difference between a "potential" constant-expression and a regular
constant-expression is the treatment of parameters; in a constexpr function,
a parameter is potentially constant when evaluating a call to that function,
but it is not constant during parsing of the function.
cp_parser_constant_expression should check the latter rather than the
former.
gcc/cp/ChangeLog:
* cp-tree.h (is_rvalue_constant_expression): Declare.
* constexpr.c (is_rvalue_constant_expression): New.
* parser.c (cp_parser_constant_expression): Use it.
* decl.c (cp_finish_decl): Try to treat a constexpr initializer in a
template as constant.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions