PR c++/91129 - wrong error with binary op in template argument.
authorMarek Polacek <polacek@redhat.com>
Sun, 1 Sep 2019 22:54:15 +0000 (22:54 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sun, 1 Sep 2019 22:54:15 +0000 (22:54 +0000)
commit556f8de3bec99dfe1dac15fecc704025d22b8fd4
treea86ef5468ae8a39a0c8efe57c66643cfa648a693
parenta37ab089c22f8be834bb1b5fd4c0454224db9b0f
PR c++/91129 - wrong error with binary op in template argument.

* typeck.c (warn_for_null_address): Use fold_for_warn instead of
fold_non_dependent_expr.
(cp_build_binary_op): Likewise.

* g++.dg/cpp1y/nontype1.C: New test.

From-SVN: r275285
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/nontype1.C [new file with mode: 0644]