PR c++/84596
* semantics.c (finish_static_assert): Check
instantiation_dependent_expression_p instead of
{type,value}_dependent_expression_p.
* g++.dg/cpp0x/static_assert15.C: New test.
From-SVN: r258513
+2018-03-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84596
+ * semantics.c (finish_static_assert): Check
+ instantiation_dependent_expression_p instead of
+ {type,value}_dependent_expression_p.
+
2018-03-13 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
if (check_for_bare_parameter_packs (condition))
condition = error_mark_node;
- if (type_dependent_expression_p (condition)
- || value_dependent_expression_p (condition))
+ if (instantiation_dependent_expression_p (condition))
{
/* We're in a template; build a STATIC_ASSERT and put it in
the right place. */
+2018-03-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/84596
+ * g++.dg/cpp0x/static_assert15.C: New test.
+
2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/61775
--- /dev/null
+// PR c++/84596
+// { dg-do compile { target c++11 } }
+
+template<int x>
+struct a {
+ constexpr void b() {
+ int c;
+ static_assert(c %= 1, "");
+ }
+};