From cff70fa0d397d2c349dc959239476972d5bcbec7 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 1 Dec 2015 10:50:41 -0500 Subject: [PATCH 05/10] Fix location of dg-error within g++.dg/template/pr64100.C MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Here's what it now emits (if caret-printing were enabled): g++.dg/template/pr64100.C: In instantiation of ‘class foo’: g++.dg/template/pr64100.C:8:16: required from here g++.dg/template/pr64100.C:5:41: error: invalid use of incomplete type ‘class foo’ static_assert(noexcept(((foo *)1)->~foo()), ""); // { dg-error "incomplete type" } ~~~~~~~~~~~~~^~~ g++.dg/template/pr64100.C:3:27: note: definition of ‘class foo’ is not complete until the closing brace template struct foo // { dg-message "note" } ^~~ gcc/testsuite/ChangeLog: * g++.dg/template/pr64100.C: Update location of dg-error directive. --- gcc/testsuite/g++.dg/template/pr64100.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/template/pr64100.C b/gcc/testsuite/g++.dg/template/pr64100.C index 493849f..051800c 100644 --- a/gcc/testsuite/g++.dg/template/pr64100.C +++ b/gcc/testsuite/g++.dg/template/pr64100.C @@ -1,8 +1,8 @@ // { dg-do compile { target c++11 } } template struct foo // { dg-message "note" } -{ // { dg-error "incomplete type" } - static_assert(noexcept(((foo *)1)->~foo()), ""); +{ + static_assert(noexcept(((foo *)1)->~foo()), ""); // { dg-error "incomplete type" } }; template class foo; -- 1.8.5.3