From 84ffba1283c323e559d487f5a44012e2481f7c85 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 31 Oct 2017 20:30:51 +0000 Subject: [PATCH] pt.c: add missing %< and %> gcc/cp/ChangeLog: * pt.c (listify): Use %< and %> for description of #include. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/auto21.C: Update dg-error to reflect addition of quotes. * g++.dg/cpp0x/missing-initializer_list-include.C: Likewise. From-SVN: r254281 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/pt.c | 2 +- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/cpp0x/auto21.C | 2 +- .../g++.dg/cpp0x/missing-initializer_list-include.C | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4b92622d027..00ac5938ee1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2017-10-31 David Malcolm + + * pt.c (listify): Use %< and %> for description of #include. + 2017-10-31 David Malcolm * class.c (explain_non_literal_class): Use UNKNOWN_LOCATION rather diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f525d2233cc..629b2dd50ef 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -25132,7 +25132,7 @@ listify (tree arg) maybe_add_include_fixit (&richloc, ""); error_at (&richloc, "deducing from brace-enclosed initializer list" - " requires #include "); + " requires %<#include %>"); return error_mark_node; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 42e634dbcc4..196c7a1f4f2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-10-31 David Malcolm + + * g++.dg/cpp0x/auto21.C: Update dg-error to reflect addition of + quotes. + * g++.dg/cpp0x/missing-initializer_list-include.C: Likewise. + 2017-10-31 David Malcolm * gcc.dg/plugin/diagnostic_plugin_show_trees.c (show_tree): Update diff --git a/gcc/testsuite/g++.dg/cpp0x/auto21.C b/gcc/testsuite/g++.dg/cpp0x/auto21.C index a827b3df853..346e98c254e 100644 --- a/gcc/testsuite/g++.dg/cpp0x/auto21.C +++ b/gcc/testsuite/g++.dg/cpp0x/auto21.C @@ -1,5 +1,5 @@ // Origin PR c++/47208 // { dg-do compile { target c++11 } } -constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires #include " } +constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires '#include '" } static const int l = list.size(); diff --git a/gcc/testsuite/g++.dg/cpp0x/missing-initializer_list-include.C b/gcc/testsuite/g++.dg/cpp0x/missing-initializer_list-include.C index 8e803c82f24..7d72ec45de4 100644 --- a/gcc/testsuite/g++.dg/cpp0x/missing-initializer_list-include.C +++ b/gcc/testsuite/g++.dg/cpp0x/missing-initializer_list-include.C @@ -7,7 +7,7 @@ void test (int i) { - auto a = { &i }; // { dg-error "deducing from brace-enclosed initializer list requires #include " } + auto a = { &i }; // { dg-error "deducing from brace-enclosed initializer list requires '#include '" } } /* Verify the output from -fdiagnostics-generate-patch. -- 2.30.2