r272229 - in /branches/gcc-9-branch/gcc: cp/Cha...
mpolacek@gcc.gnu.org
mpolacek@gcc.gnu.org
Thu Jun 13 00:56:00 GMT 2019
Author: mpolacek
Date: Thu Jun 13 00:56:54 2019
New Revision: 272229
URL: https://gcc.gnu.org/viewcvs?rev=272229&root=gcc&view=rev
Log:
PR c++/90825 - endless recursion when evaluating sizeof.
PR c++/90832 - endless recursion when evaluating sizeof.
* constexpr.c (cxx_eval_constant_expression): Don't recurse on the
result of fold_sizeof_expr if is returns a SIZEOF_EXPR.
* typeck.c (cxx_sizeof_expr): Only return a SIZEOF_EXPR if the operand
is instantiation-dependent.
* g++.dg/cpp0x/constexpr-sizeof2.C: New test.
* g++.dg/cpp0x/constexpr-sizeof3.C: New test.
Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-sizeof2.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-sizeof3.C
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/constexpr.c
branches/gcc-9-branch/gcc/cp/typeck.c
More information about the Gcc-cvs
mailing list