Jason's recent patch
2019-12-17  Jason Merrill  <ja...@redhat.com>

        PR c++/79592 - missing explanation of invalid constexpr.

Caused ubsan/vptr-4.C to emit an additional, correct, diagnostic. Committing this to update the testcase.

nathan
--
Nathan Sidwell
2020-01-06  Nathan Sidwell  <nat...@acm.org>

	PR c++/79592
	* g++.dg/ubsan/vptr-4.C: Add expected error.

Index: gcc/testsuite/g++.dg/ubsan/vptr-4.C
===================================================================
--- gcc/testsuite/g++.dg/ubsan/vptr-4.C	(revision 279901)
+++ gcc/testsuite/g++.dg/ubsan/vptr-4.C	(working copy)
@@ -36,5 +36,5 @@ struct W : V<U> {
   int g() { return 0; }
   virtual int v() { return 1; }
-  constexpr const W<U> *foo() { return (const W<U> *) reinterpret_cast<const V<U> *> (this); }
+  constexpr const W<U> *foo() { return (const W<U> *) reinterpret_cast<const V<U> *> (this); } // { dg-error "is not a constant expression" }
 };
 

Reply via email to