-
- Downloads
c++: check constexpr constructor body
The implicit constexpr patch revealed that our checks for constexpr constructors that could possibly produce a constant value (which otherwise are IFNDR) was failing to look at most of the function body. Fixing that required some library tweaks. gcc/cp/ChangeLog: * constexpr.c (maybe_save_constexpr_fundef): Also check whether the body of a constructor is potentially constant. libstdc++-v3/ChangeLog: * src/c++17/memory_resource.cc: Add missing constexpr. * include/experimental/internet: Only mark copy constructor as constexpr with __cpp_constexpr_dynamic_alloc. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/constexpr-89285-2.C: Expect error. * g++.dg/cpp1y/constexpr-89285.C: Adjust error.
Showing
- gcc/cp/constexpr.c 20 additions, 7 deletionsgcc/cp/constexpr.c
- gcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C 1 addition, 1 deletiongcc/testsuite/g++.dg/cpp1y/constexpr-89285-2.C
- gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C 1 addition, 1 deletiongcc/testsuite/g++.dg/cpp1y/constexpr-89285.C
- libstdc++-v3/include/experimental/internet 2 additions, 0 deletionslibstdc++-v3/include/experimental/internet
- libstdc++-v3/src/c++17/memory_resource.cc 1 addition, 1 deletionlibstdc++-v3/src/c++17/memory_resource.cc
Loading
Please register or sign in to comment