From 3a1351b9daff403b268b4e08313bcbafe476be33 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 15 Apr 2015 17:18:27 +0000 Subject: [PATCH] call.c (enforce_access): Emit error + inform. /cp 2015-04-15 Paolo Carlini * call.c (enforce_access): Emit error + inform. /testsuite 2015-04-15 Paolo Carlini * g++.dg/cpp0x/alias-decl-22.C: Adjust for error + inform change. * g++.dg/cpp0x/decltype-call1.C: Likewise. * g++.dg/cpp0x/defaulted21.C: Likewise. * g++.dg/cpp0x/defaulted28.C: Likewise. * g++.dg/cpp0x/defaulted47.C: Likewise. * g++.dg/cpp0x/elision_neg.C: Likewise. * g++.dg/cpp0x/fntmpdefarg3.C: Likewise. * g++.dg/cpp0x/implicit-trivial1.C: Likewise. * g++.dg/cpp0x/implicit1.C: Likewise. * g++.dg/cpp0x/implicit9.C: Likewise. * g++.dg/cpp0x/inh-ctor9.C: Likewise. * g++.dg/cpp0x/range-for13.C: Likewise. * g++.dg/gomp/clause-2.C: Likewise. * g++.dg/gomp/udr-5.C: Likewise. * g++.dg/inherit/access6.C: Likewise. * g++.dg/lookup/duperr1.C: Likewise. * g++.dg/lookup/friend2.C: Likewise. * g++.dg/lookup/pr6936.C: Likewise. * g++.dg/lookup/scoped1.C: Likewise. * g++.dg/lookup/using26.C: Likewise. * g++.dg/lookup/using38.C: Likewise. * g++.dg/other/access2.C: Likewise. * g++.dg/overload/defarg3.C: Likewise. * g++.dg/overload/defarg6.C: Likewise. * g++.dg/parse/access11.C: Likewise. * g++.dg/parse/access2.C: Likewise. * g++.dg/parse/access3.C: Likewise. * g++.dg/parse/access4.C: Likewise. * g++.dg/parse/access5.C: Likewise. * g++.dg/parse/access6.C: Likewise. * g++.dg/parse/access8.C: Likewise. * g++.dg/parse/access9.C: Likewise. * g++.dg/parse/crash40.C: Likewise. * g++.dg/tc1/dr142.C: Likewise. * g++.dg/tc1/dr166.C: Likewise. * g++.dg/tc1/dr52.C: Likewise. * g++.dg/template/access11.C: Likewise. * g++.dg/template/access18.C: Likewise. * g++.dg/template/access19.C: Likewise. * g++.dg/template/access2.C: Likewise. * g++.dg/template/access20.C: Likewise. * g++.dg/template/access26.C: Likewise. * g++.dg/template/access3.C: Likewise. * g++.dg/template/access7.C: Likewise. * g++.dg/template/conv12.C: Likewise. * g++.dg/template/crash69.C: Likewise. * g++.dg/template/friend31.C: Likewise. * g++.dg/template/friend32.C: Likewise. * g++.dg/template/memfriend15.C: Likewise. * g++.dg/template/memfriend16.C: Likewise. * g++.dg/template/memfriend17.C: Likewise. * g++.dg/template/memfriend7.C: Likewise. * g++.dg/template/pr32519.C: Likewise. * g++.dg/template/qualttp21.C: Likewise. * g++.dg/template/qualttp8.C: Likewise. * g++.dg/template/ttp10.C: Likewise. * g++.dg/template/typedef11.C: Likewise. * g++.dg/template/typedef13.C: Likewise. * g++.dg/template/typedef19.C: Likewise. * g++.dg/template/typedef20.C: Likewise. * g++.dg/template/typedef22.C: Likewise. * g++.dg/template/using16.C: Likewise. * g++.dg/template/virtual3.C: Likewise. * g++.dg/ubsan/pr61272.C: Likewise. * g++.old-deja/g++.bob/inherit2.C: Likewise. * g++.old-deja/g++.brendan/crash11.C: Likewise. * g++.old-deja/g++.brendan/enum6.C: Likewise. * g++.old-deja/g++.brendan/visibility1.C: Likewise. * g++.old-deja/g++.brendan/visibility10.C: Likewise. * g++.old-deja/g++.brendan/visibility2.C: Likewise. * g++.old-deja/g++.brendan/visibility6.C: Likewise. * g++.old-deja/g++.brendan/visibility7.C: Likewise. * g++.old-deja/g++.brendan/visibility8.C: Likewise. * g++.old-deja/g++.brendan/visibility9.C: Likewise. * g++.old-deja/g++.bugs/900428_03.C: Likewise. * g++.old-deja/g++.jason/access17.C: Likewise. * g++.old-deja/g++.jason/access18.C: Likewise. * g++.old-deja/g++.jason/access22.C: Likewise. * g++.old-deja/g++.jason/access23.C: Likewise. * g++.old-deja/g++.jason/access8.C: Likewise. * g++.old-deja/g++.jason/delete3.C: Likewise. * g++.old-deja/g++.jason/report.C: Likewise. * g++.old-deja/g++.law/access2.C: Likewise. * g++.old-deja/g++.law/access3.C: Likewise. * g++.old-deja/g++.law/access4.C: Likewise. * g++.old-deja/g++.law/access5.C: Likewise. * g++.old-deja/g++.law/arm12.C: Likewise. * g++.old-deja/g++.law/arm14.C: Likewise. * g++.old-deja/g++.law/ctors13.C: Likewise. * g++.old-deja/g++.law/union2.C: Likewise. * g++.old-deja/g++.law/visibility12.C: Likewise. * g++.old-deja/g++.law/visibility15.C: Likewise. * g++.old-deja/g++.law/visibility16.C: Likewise. * g++.old-deja/g++.law/visibility17.C: Likewise. * g++.old-deja/g++.law/visibility18.C: Likewise. * g++.old-deja/g++.law/visibility19.C: Likewise. * g++.old-deja/g++.law/visibility20.C: Likewise. * g++.old-deja/g++.law/visibility21.C: Likewise. * g++.old-deja/g++.law/visibility24.C: Likewise. * g++.old-deja/g++.law/visibility4.C: Likewise. * g++.old-deja/g++.law/visibility5.C: Likewise. * g++.old-deja/g++.law/visibility6.C: Likewise. * g++.old-deja/g++.law/visibility7.C: Likewise. * g++.old-deja/g++.law/visibility8.C: Likewise. * g++.old-deja/g++.law/visibility9.C: Likewise. * g++.old-deja/g++.niklas/t135.C: Likewise. * g++.old-deja/g++.oliva/delete1.C: Likewise. * g++.old-deja/g++.oliva/partord1.C: Likewise. * g++.old-deja/g++.other/access11.C: Likewise. * g++.old-deja/g++.other/access4.C: Likewise. * g++.old-deja/g++.other/access7.C: Likewise. * g++.old-deja/g++.other/crash1.C: Likewise. * g++.old-deja/g++.other/crash7.C: Likewise. * g++.old-deja/g++.other/friend1.C: Likewise. * g++.old-deja/g++.other/friend4.C: Likewise. * g++.old-deja/g++.other/friend9.C: Likewise. * g++.old-deja/g++.other/lineno1.C: Likewise. * g++.old-deja/g++.other/using1.C: Likewise. * g++.old-deja/g++.pt/enum14.C: Likewise. * g++.old-deja/g++.pt/friend11.C: Likewise. * g++.old-deja/g++.pt/friend21.C: Likewise. * g++.old-deja/g++.pt/friend3.C: Likewise. * g++.old-deja/g++.pt/inherit2.C: Likewise. * g++.old-deja/g++.pt/memtemp74.C: Likewise. * g++.old-deja/g++.pt/memtemp89.C: Likewise. * g++.old-deja/g++.robertl/eb94.C: Likewise. From-SVN: r222128 --- gcc/cp/ChangeLog | 4 + gcc/cp/call.c | 18 ++- gcc/testsuite/ChangeLog | 129 ++++++++++++++++++ gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C | 2 +- gcc/testsuite/g++.dg/cpp0x/decltype-call1.C | 2 +- gcc/testsuite/g++.dg/cpp0x/defaulted21.C | 2 +- gcc/testsuite/g++.dg/cpp0x/defaulted28.C | 2 +- gcc/testsuite/g++.dg/cpp0x/defaulted47.C | 4 +- gcc/testsuite/g++.dg/cpp0x/elision_neg.C | 2 +- gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C | 2 +- .../g++.dg/cpp0x/implicit-trivial1.C | 2 +- gcc/testsuite/g++.dg/cpp0x/implicit1.C | 2 +- gcc/testsuite/g++.dg/cpp0x/implicit9.C | 2 +- gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C | 2 +- gcc/testsuite/g++.dg/cpp0x/range-for13.C | 6 +- gcc/testsuite/g++.dg/gomp/clause-2.C | 6 +- gcc/testsuite/g++.dg/gomp/udr-5.C | 4 +- gcc/testsuite/g++.dg/inherit/access6.C | 4 +- gcc/testsuite/g++.dg/lookup/duperr1.C | 2 +- gcc/testsuite/g++.dg/lookup/friend2.C | 2 +- gcc/testsuite/g++.dg/lookup/pr6936.C | 2 +- gcc/testsuite/g++.dg/lookup/scoped1.C | 2 +- gcc/testsuite/g++.dg/lookup/using26.C | 2 +- gcc/testsuite/g++.dg/lookup/using38.C | 2 +- gcc/testsuite/g++.dg/other/access2.C | 2 +- gcc/testsuite/g++.dg/overload/defarg3.C | 2 +- gcc/testsuite/g++.dg/overload/defarg6.C | 2 +- gcc/testsuite/g++.dg/parse/access11.C | 14 +- gcc/testsuite/g++.dg/parse/access2.C | 2 +- gcc/testsuite/g++.dg/parse/access3.C | 2 +- gcc/testsuite/g++.dg/parse/access4.C | 2 +- gcc/testsuite/g++.dg/parse/access5.C | 2 +- gcc/testsuite/g++.dg/parse/access6.C | 2 +- gcc/testsuite/g++.dg/parse/access8.C | 2 +- gcc/testsuite/g++.dg/parse/access9.C | 2 +- gcc/testsuite/g++.dg/parse/crash40.C | 4 +- gcc/testsuite/g++.dg/tc1/dr142.C | 6 +- gcc/testsuite/g++.dg/tc1/dr166.C | 6 +- gcc/testsuite/g++.dg/tc1/dr52.C | 2 +- gcc/testsuite/g++.dg/template/access11.C | 2 +- gcc/testsuite/g++.dg/template/access18.C | 6 +- gcc/testsuite/g++.dg/template/access19.C | 2 +- gcc/testsuite/g++.dg/template/access2.C | 4 +- gcc/testsuite/g++.dg/template/access20.C | 2 +- gcc/testsuite/g++.dg/template/access26.C | 2 +- gcc/testsuite/g++.dg/template/access3.C | 2 +- gcc/testsuite/g++.dg/template/access7.C | 2 +- gcc/testsuite/g++.dg/template/conv12.C | 2 +- gcc/testsuite/g++.dg/template/crash69.C | 2 +- gcc/testsuite/g++.dg/template/friend31.C | 2 +- gcc/testsuite/g++.dg/template/friend32.C | 2 +- gcc/testsuite/g++.dg/template/memfriend15.C | 2 +- gcc/testsuite/g++.dg/template/memfriend16.C | 2 +- gcc/testsuite/g++.dg/template/memfriend17.C | 2 +- gcc/testsuite/g++.dg/template/memfriend7.C | 2 +- gcc/testsuite/g++.dg/template/pr32519.C | 2 +- gcc/testsuite/g++.dg/template/qualttp21.C | 2 +- gcc/testsuite/g++.dg/template/qualttp8.C | 2 +- gcc/testsuite/g++.dg/template/ttp10.C | 4 +- gcc/testsuite/g++.dg/template/typedef11.C | 4 +- gcc/testsuite/g++.dg/template/typedef13.C | 2 +- gcc/testsuite/g++.dg/template/typedef19.C | 2 +- gcc/testsuite/g++.dg/template/typedef20.C | 2 +- gcc/testsuite/g++.dg/template/typedef22.C | 2 +- gcc/testsuite/g++.dg/template/using16.C | 2 +- gcc/testsuite/g++.dg/template/virtual3.C | 2 +- gcc/testsuite/g++.dg/ubsan/pr61272.C | 2 +- gcc/testsuite/g++.old-deja/g++.bob/inherit2.C | 2 +- .../g++.old-deja/g++.brendan/crash11.C | 4 +- .../g++.old-deja/g++.brendan/enum6.C | 2 +- .../g++.old-deja/g++.brendan/visibility1.C | 2 +- .../g++.old-deja/g++.brendan/visibility10.C | 2 +- .../g++.old-deja/g++.brendan/visibility2.C | 2 +- .../g++.old-deja/g++.brendan/visibility6.C | 2 +- .../g++.old-deja/g++.brendan/visibility7.C | 2 +- .../g++.old-deja/g++.brendan/visibility8.C | 2 +- .../g++.old-deja/g++.brendan/visibility9.C | 2 +- .../g++.old-deja/g++.bugs/900428_03.C | 2 +- .../g++.old-deja/g++.jason/access17.C | 4 +- .../g++.old-deja/g++.jason/access18.C | 4 +- .../g++.old-deja/g++.jason/access22.C | 2 +- .../g++.old-deja/g++.jason/access23.C | 16 +-- .../g++.old-deja/g++.jason/access8.C | 2 +- .../g++.old-deja/g++.jason/delete3.C | 2 +- gcc/testsuite/g++.old-deja/g++.jason/report.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/access2.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/access3.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/access4.C | 4 +- gcc/testsuite/g++.old-deja/g++.law/access5.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/arm12.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/arm14.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/ctors13.C | 2 +- gcc/testsuite/g++.old-deja/g++.law/union2.C | 4 +- .../g++.old-deja/g++.law/visibility12.C | 2 +- .../g++.old-deja/g++.law/visibility15.C | 2 +- .../g++.old-deja/g++.law/visibility16.C | 2 +- .../g++.old-deja/g++.law/visibility17.C | 4 +- .../g++.old-deja/g++.law/visibility18.C | 2 +- .../g++.old-deja/g++.law/visibility19.C | 2 +- .../g++.old-deja/g++.law/visibility20.C | 2 +- .../g++.old-deja/g++.law/visibility21.C | 2 +- .../g++.old-deja/g++.law/visibility24.C | 2 +- .../g++.old-deja/g++.law/visibility4.C | 2 +- .../g++.old-deja/g++.law/visibility5.C | 2 +- .../g++.old-deja/g++.law/visibility6.C | 2 +- .../g++.old-deja/g++.law/visibility7.C | 4 +- .../g++.old-deja/g++.law/visibility8.C | 2 +- .../g++.old-deja/g++.law/visibility9.C | 2 +- gcc/testsuite/g++.old-deja/g++.niklas/t135.C | 2 +- .../g++.old-deja/g++.oliva/delete1.C | 2 +- .../g++.old-deja/g++.oliva/partord1.C | 2 +- .../g++.old-deja/g++.other/access11.C | 2 +- .../g++.old-deja/g++.other/access4.C | 2 +- .../g++.old-deja/g++.other/access7.C | 4 +- gcc/testsuite/g++.old-deja/g++.other/crash1.C | 2 +- gcc/testsuite/g++.old-deja/g++.other/crash7.C | 2 +- .../g++.old-deja/g++.other/friend1.C | 10 +- .../g++.old-deja/g++.other/friend4.C | 2 +- .../g++.old-deja/g++.other/friend9.C | 2 +- .../g++.old-deja/g++.other/lineno1.C | 4 +- gcc/testsuite/g++.old-deja/g++.other/using1.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/enum14.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/friend11.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/friend21.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/friend3.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/inherit2.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/memtemp89.C | 2 +- gcc/testsuite/g++.old-deja/g++.robertl/eb94.C | 2 +- 129 files changed, 318 insertions(+), 175 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 15a1b8baf05..0302516186e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2015-04-15 Paolo Carlini + + * call.c (enforce_access): Emit error + inform. + 2015-04-15 Marek Polacek * constexpr.c (use_new_call): Remove #define. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 31d2b9c2c9e..c9ecc16e400 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6020,12 +6020,22 @@ enforce_access (tree basetype_path, tree decl, tree diag_decl, if (complain & tf_error) { if (TREE_PRIVATE (decl)) - error ("%q+#D is private", diag_decl); + { + error ("%q#D is private within this context", diag_decl); + inform (DECL_SOURCE_LOCATION (diag_decl), + "declared private here"); + } else if (TREE_PROTECTED (decl)) - error ("%q+#D is protected", diag_decl); + { + error ("%q#D is protected within this context", diag_decl); + inform (DECL_SOURCE_LOCATION (diag_decl), + "declared protected here"); + } else - error ("%q+#D is inaccessible", diag_decl); - error ("within this context"); + { + error ("%q#D is inaccessible within this context", diag_decl); + inform (DECL_SOURCE_LOCATION (diag_decl), "declared here"); + } } return false; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1df85887f66..0912b4b571b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,132 @@ +2015-04-15 Paolo Carlini + + * g++.dg/cpp0x/alias-decl-22.C: Adjust for error + inform change. + * g++.dg/cpp0x/decltype-call1.C: Likewise. + * g++.dg/cpp0x/defaulted21.C: Likewise. + * g++.dg/cpp0x/defaulted28.C: Likewise. + * g++.dg/cpp0x/defaulted47.C: Likewise. + * g++.dg/cpp0x/elision_neg.C: Likewise. + * g++.dg/cpp0x/fntmpdefarg3.C: Likewise. + * g++.dg/cpp0x/implicit-trivial1.C: Likewise. + * g++.dg/cpp0x/implicit1.C: Likewise. + * g++.dg/cpp0x/implicit9.C: Likewise. + * g++.dg/cpp0x/inh-ctor9.C: Likewise. + * g++.dg/cpp0x/range-for13.C: Likewise. + * g++.dg/gomp/clause-2.C: Likewise. + * g++.dg/gomp/udr-5.C: Likewise. + * g++.dg/inherit/access6.C: Likewise. + * g++.dg/lookup/duperr1.C: Likewise. + * g++.dg/lookup/friend2.C: Likewise. + * g++.dg/lookup/pr6936.C: Likewise. + * g++.dg/lookup/scoped1.C: Likewise. + * g++.dg/lookup/using26.C: Likewise. + * g++.dg/lookup/using38.C: Likewise. + * g++.dg/other/access2.C: Likewise. + * g++.dg/overload/defarg3.C: Likewise. + * g++.dg/overload/defarg6.C: Likewise. + * g++.dg/parse/access11.C: Likewise. + * g++.dg/parse/access2.C: Likewise. + * g++.dg/parse/access3.C: Likewise. + * g++.dg/parse/access4.C: Likewise. + * g++.dg/parse/access5.C: Likewise. + * g++.dg/parse/access6.C: Likewise. + * g++.dg/parse/access8.C: Likewise. + * g++.dg/parse/access9.C: Likewise. + * g++.dg/parse/crash40.C: Likewise. + * g++.dg/tc1/dr142.C: Likewise. + * g++.dg/tc1/dr166.C: Likewise. + * g++.dg/tc1/dr52.C: Likewise. + * g++.dg/template/access11.C: Likewise. + * g++.dg/template/access18.C: Likewise. + * g++.dg/template/access19.C: Likewise. + * g++.dg/template/access2.C: Likewise. + * g++.dg/template/access20.C: Likewise. + * g++.dg/template/access26.C: Likewise. + * g++.dg/template/access3.C: Likewise. + * g++.dg/template/access7.C: Likewise. + * g++.dg/template/conv12.C: Likewise. + * g++.dg/template/crash69.C: Likewise. + * g++.dg/template/friend31.C: Likewise. + * g++.dg/template/friend32.C: Likewise. + * g++.dg/template/memfriend15.C: Likewise. + * g++.dg/template/memfriend16.C: Likewise. + * g++.dg/template/memfriend17.C: Likewise. + * g++.dg/template/memfriend7.C: Likewise. + * g++.dg/template/pr32519.C: Likewise. + * g++.dg/template/qualttp21.C: Likewise. + * g++.dg/template/qualttp8.C: Likewise. + * g++.dg/template/ttp10.C: Likewise. + * g++.dg/template/typedef11.C: Likewise. + * g++.dg/template/typedef13.C: Likewise. + * g++.dg/template/typedef19.C: Likewise. + * g++.dg/template/typedef20.C: Likewise. + * g++.dg/template/typedef22.C: Likewise. + * g++.dg/template/using16.C: Likewise. + * g++.dg/template/virtual3.C: Likewise. + * g++.dg/ubsan/pr61272.C: Likewise. + * g++.old-deja/g++.bob/inherit2.C: Likewise. + * g++.old-deja/g++.brendan/crash11.C: Likewise. + * g++.old-deja/g++.brendan/enum6.C: Likewise. + * g++.old-deja/g++.brendan/visibility1.C: Likewise. + * g++.old-deja/g++.brendan/visibility10.C: Likewise. + * g++.old-deja/g++.brendan/visibility2.C: Likewise. + * g++.old-deja/g++.brendan/visibility6.C: Likewise. + * g++.old-deja/g++.brendan/visibility7.C: Likewise. + * g++.old-deja/g++.brendan/visibility8.C: Likewise. + * g++.old-deja/g++.brendan/visibility9.C: Likewise. + * g++.old-deja/g++.bugs/900428_03.C: Likewise. + * g++.old-deja/g++.jason/access17.C: Likewise. + * g++.old-deja/g++.jason/access18.C: Likewise. + * g++.old-deja/g++.jason/access22.C: Likewise. + * g++.old-deja/g++.jason/access23.C: Likewise. + * g++.old-deja/g++.jason/access8.C: Likewise. + * g++.old-deja/g++.jason/delete3.C: Likewise. + * g++.old-deja/g++.jason/report.C: Likewise. + * g++.old-deja/g++.law/access2.C: Likewise. + * g++.old-deja/g++.law/access3.C: Likewise. + * g++.old-deja/g++.law/access4.C: Likewise. + * g++.old-deja/g++.law/access5.C: Likewise. + * g++.old-deja/g++.law/arm12.C: Likewise. + * g++.old-deja/g++.law/arm14.C: Likewise. + * g++.old-deja/g++.law/ctors13.C: Likewise. + * g++.old-deja/g++.law/union2.C: Likewise. + * g++.old-deja/g++.law/visibility12.C: Likewise. + * g++.old-deja/g++.law/visibility15.C: Likewise. + * g++.old-deja/g++.law/visibility16.C: Likewise. + * g++.old-deja/g++.law/visibility17.C: Likewise. + * g++.old-deja/g++.law/visibility18.C: Likewise. + * g++.old-deja/g++.law/visibility19.C: Likewise. + * g++.old-deja/g++.law/visibility20.C: Likewise. + * g++.old-deja/g++.law/visibility21.C: Likewise. + * g++.old-deja/g++.law/visibility24.C: Likewise. + * g++.old-deja/g++.law/visibility4.C: Likewise. + * g++.old-deja/g++.law/visibility5.C: Likewise. + * g++.old-deja/g++.law/visibility6.C: Likewise. + * g++.old-deja/g++.law/visibility7.C: Likewise. + * g++.old-deja/g++.law/visibility8.C: Likewise. + * g++.old-deja/g++.law/visibility9.C: Likewise. + * g++.old-deja/g++.niklas/t135.C: Likewise. + * g++.old-deja/g++.oliva/delete1.C: Likewise. + * g++.old-deja/g++.oliva/partord1.C: Likewise. + * g++.old-deja/g++.other/access11.C: Likewise. + * g++.old-deja/g++.other/access4.C: Likewise. + * g++.old-deja/g++.other/access7.C: Likewise. + * g++.old-deja/g++.other/crash1.C: Likewise. + * g++.old-deja/g++.other/crash7.C: Likewise. + * g++.old-deja/g++.other/friend1.C: Likewise. + * g++.old-deja/g++.other/friend4.C: Likewise. + * g++.old-deja/g++.other/friend9.C: Likewise. + * g++.old-deja/g++.other/lineno1.C: Likewise. + * g++.old-deja/g++.other/using1.C: Likewise. + * g++.old-deja/g++.pt/enum14.C: Likewise. + * g++.old-deja/g++.pt/friend11.C: Likewise. + * g++.old-deja/g++.pt/friend21.C: Likewise. + * g++.old-deja/g++.pt/friend3.C: Likewise. + * g++.old-deja/g++.pt/inherit2.C: Likewise. + * g++.old-deja/g++.pt/memtemp74.C: Likewise. + * g++.old-deja/g++.pt/memtemp89.C: Likewise. + * g++.old-deja/g++.robertl/eb94.C: Likewise. + 2015-04-15 Jakub Jelinek PR ipa/65765 diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C index 1f6cb8f40b8..c25ee17278e 100644 --- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C @@ -7,6 +7,6 @@ using foo = typename T::bar; // { dg-error "this context" } class B { - typedef int bar; // { dg-error "private" } + typedef int bar; // { dg-message "private" } foo f; // { dg-message "required" } }; diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C index 39069ba228f..ebdcc840cc3 100644 --- a/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C @@ -17,7 +17,7 @@ decltype(45,f(),42) g4b(); // { dg-error "" } class B { - ~B(); // { dg-error "private" } + ~B(); // { dg-message "private" } public: int i; void operator[](int); diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted21.C b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C index 63c98e67657..312194d9876 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted21.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C @@ -4,7 +4,7 @@ struct U { U(); private: - U(U const&); // { dg-error "private" } + U(U const&); // { dg-message "private" } }; struct X { diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted28.C b/gcc/testsuite/g++.dg/cpp0x/defaulted28.C index aa900998d2f..451a1b4198f 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted28.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted28.C @@ -6,7 +6,7 @@ struct A { A() = default; private: - A(A const&) = default; // { dg-error "private" } + A(A const&) = default; // { dg-message "private" } }; int f(...) { } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted47.C b/gcc/testsuite/g++.dg/cpp0x/defaulted47.C index f4b62a3c659..c4f445b9e1c 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted47.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted47.C @@ -3,14 +3,14 @@ class A { - A() = default; // { dg-error "private" } + A() = default; // { dg-message "private" } }; A a; // { dg-error "context" } class B { - ~B() = default; // { dg-error "private" } + ~B() = default; // { dg-message "private" } }; B b; // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/cpp0x/elision_neg.C b/gcc/testsuite/g++.dg/cpp0x/elision_neg.C index 0870a80930c..4995acd50a5 100644 --- a/gcc/testsuite/g++.dg/cpp0x/elision_neg.C +++ b/gcc/testsuite/g++.dg/cpp0x/elision_neg.C @@ -12,7 +12,7 @@ struct two {char x[2];}; class move_only { - move_only(const move_only&); // { dg-error "is private" } + move_only(const move_only&); // { dg-message "private" } move_only& operator=(const move_only&); public: move_only() {} diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C index 8e9b76fe0e1..43affd12775 100644 --- a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C +++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C @@ -8,7 +8,7 @@ template void j(T) {} // { dg-error "this conte class A { - typedef int I; // { dg-error "private" } + typedef int I; // { dg-message "private" } template friend void f(T); friend void g(A); friend void h(A); diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C b/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C index 23921c70386..e3491e07acd 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C @@ -8,7 +8,7 @@ struct A { A() {} private: - template A(T&); // { dg-error "private" } + template A(T&); // { dg-message "private" } }; struct B // { dg-error "implicitly deleted|this context" } diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit1.C b/gcc/testsuite/g++.dg/cpp0x/implicit1.C index 7eb3371798a..e784ee4e2da 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit1.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit1.C @@ -5,7 +5,7 @@ class C { - void operator delete (void *); // { dg-error "private" } + void operator delete (void *); // { dg-message "private" } public: virtual ~C(); // { dg-error "overriding" } }; diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit9.C b/gcc/testsuite/g++.dg/cpp0x/implicit9.C index 0952a420882..e1f989c6542 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit9.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit9.C @@ -5,7 +5,7 @@ struct A { A(); private: - ~A(); // { dg-error "private" } + ~A(); // { dg-message "private" } }; struct B: A { }; // { dg-error "implicitly deleted|context" } diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C index 39751013bf3..676605db9e9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C +++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C @@ -9,7 +9,7 @@ protected: struct B: A { - using A::A; // { dg-error "protected" } + using A::A; // { dg-message "protected" } }; B b(42); // { dg-error "this context" } diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for13.C b/gcc/testsuite/g++.dg/cpp0x/range-for13.C index ab7bdde478e..100f531f760 100644 --- a/gcc/testsuite/g++.dg/cpp0x/range-for13.C +++ b/gcc/testsuite/g++.dg/cpp0x/range-for13.C @@ -28,8 +28,8 @@ struct container2 struct container3 { private: - int *begin(); // { dg-error "is private" } - int *end(); // { dg-error "is private" } + int *begin(); // { dg-message "private" } + int *end(); // { dg-message "private" } }; struct container4 @@ -70,7 +70,7 @@ struct container8 struct private_callable { private: - int *operator()(); // { dg-error "is private" } + int *operator()(); // { dg-message "private" } }; struct container9 diff --git a/gcc/testsuite/g++.dg/gomp/clause-2.C b/gcc/testsuite/g++.dg/gomp/clause-2.C index 450419ad6cd..e9405ff7e3a 100644 --- a/gcc/testsuite/g++.dg/gomp/clause-2.C +++ b/gcc/testsuite/g++.dg/gomp/clause-2.C @@ -5,9 +5,9 @@ struct B { B(); }; struct C { C(); C(const C&); }; struct D { D& operator=(const D&); }; -class E { private: E(); public: E(int); }; // { dg-error "private" } -class F { private: F(const F&); public: F(); }; // { dg-error "private" } -class G { private: G& operator=(const G&); }; // { dg-error "private" } +class E { private: E(); public: E(int); }; // { dg-message "private" } +class F { private: F(const F&); public: F(); }; // { dg-message "private" } +class G { private: G& operator=(const G&); }; // { dg-message "private" } void bar(); void foo() diff --git a/gcc/testsuite/g++.dg/gomp/udr-5.C b/gcc/testsuite/g++.dg/gomp/udr-5.C index 425f8e95cd9..e20afd6f810 100644 --- a/gcc/testsuite/g++.dg/gomp/udr-5.C +++ b/gcc/testsuite/g++.dg/gomp/udr-5.C @@ -5,9 +5,9 @@ struct S int s; S () : s (0) {} private: - #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) // { dg-error "is private" } + #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) // { dg-message "private" } protected: - #pragma omp declare reduction (-:S:omp_out.s += omp_in.s) // { dg-error "is protected" } + #pragma omp declare reduction (-:S:omp_out.s += omp_in.s) // { dg-message "protected" } }; struct T : public S diff --git a/gcc/testsuite/g++.dg/inherit/access6.C b/gcc/testsuite/g++.dg/inherit/access6.C index 7645c2d5e0d..50786ed6a34 100644 --- a/gcc/testsuite/g++.dg/inherit/access6.C +++ b/gcc/testsuite/g++.dg/inherit/access6.C @@ -1,9 +1,9 @@ // PR c++/28588 class Foo { - static void f(); // { dg-error "private" } + static void f(); // { dg-message "private" } static void f(int); - static void g(); // { dg-error "private" } + static void g(); // { dg-message "private" } }; void h() diff --git a/gcc/testsuite/g++.dg/lookup/duperr1.C b/gcc/testsuite/g++.dg/lookup/duperr1.C index cfb348d49cd..c50e9f642b9 100644 --- a/gcc/testsuite/g++.dg/lookup/duperr1.C +++ b/gcc/testsuite/g++.dg/lookup/duperr1.C @@ -1,5 +1,5 @@ // PR c++/29048 class A { int i; }; // { dg-bogus "is private.*is private" } -// { dg-error "is private" "" { target *-*-* } 3 } +// { dg-message "private" "" { target *-*-* } 3 } class B:public A { B() { A::i=0; } }; // { dg-error "within this context" } diff --git a/gcc/testsuite/g++.dg/lookup/friend2.C b/gcc/testsuite/g++.dg/lookup/friend2.C index 765c69b67eb..1f07f263fef 100644 --- a/gcc/testsuite/g++.dg/lookup/friend2.C +++ b/gcc/testsuite/g++.dg/lookup/friend2.C @@ -12,7 +12,7 @@ struct S { namespace NS { class X { friend class S; - static int *i; // { dg-error "private" } + static int *i; // { dg-message "private" } }; } diff --git a/gcc/testsuite/g++.dg/lookup/pr6936.C b/gcc/testsuite/g++.dg/lookup/pr6936.C index 377fbcce1e3..7139ee18e6d 100644 --- a/gcc/testsuite/g++.dg/lookup/pr6936.C +++ b/gcc/testsuite/g++.dg/lookup/pr6936.C @@ -3,7 +3,7 @@ struct Baser { - enum { j, i }; // { dg-error "inaccessible" } + enum { j, i }; // { dg-message "declared" } }; struct Base : Baser diff --git a/gcc/testsuite/g++.dg/lookup/scoped1.C b/gcc/testsuite/g++.dg/lookup/scoped1.C index f1d3f403ea2..a0773cff6ca 100644 --- a/gcc/testsuite/g++.dg/lookup/scoped1.C +++ b/gcc/testsuite/g++.dg/lookup/scoped1.C @@ -4,7 +4,7 @@ struct A { static int i1; - int i2; // { dg-error "inaccessible" "" } + int i2; // { dg-message "declared" "" } static void f1 (); void f2 (); }; diff --git a/gcc/testsuite/g++.dg/lookup/using26.C b/gcc/testsuite/g++.dg/lookup/using26.C index 141d14581c1..857c1348181 100644 --- a/gcc/testsuite/g++.dg/lookup/using26.C +++ b/gcc/testsuite/g++.dg/lookup/using26.C @@ -9,7 +9,7 @@ struct A struct B { private: - int next; // { dg-error "private" } + int next; // { dg-message "private" } }; struct C diff --git a/gcc/testsuite/g++.dg/lookup/using38.C b/gcc/testsuite/g++.dg/lookup/using38.C index 377fbcce1e3..7139ee18e6d 100644 --- a/gcc/testsuite/g++.dg/lookup/using38.C +++ b/gcc/testsuite/g++.dg/lookup/using38.C @@ -3,7 +3,7 @@ struct Baser { - enum { j, i }; // { dg-error "inaccessible" } + enum { j, i }; // { dg-message "declared" } }; struct Base : Baser diff --git a/gcc/testsuite/g++.dg/other/access2.C b/gcc/testsuite/g++.dg/other/access2.C index c7dd77a043a..634fab3fe31 100644 --- a/gcc/testsuite/g++.dg/other/access2.C +++ b/gcc/testsuite/g++.dg/other/access2.C @@ -18,7 +18,7 @@ public: void test(); }; -int Base::fooprivate=42; // { dg-error "private" } +int Base::fooprivate=42; // { dg-message "private" } int Base::fooprotected=42; int Base::foopublic=42; diff --git a/gcc/testsuite/g++.dg/overload/defarg3.C b/gcc/testsuite/g++.dg/overload/defarg3.C index 6622e430a61..d6819021ba2 100644 --- a/gcc/testsuite/g++.dg/overload/defarg3.C +++ b/gcc/testsuite/g++.dg/overload/defarg3.C @@ -3,7 +3,7 @@ class C { private: - static int f(int); // { dg-error "private" } + static int f(int); // { dg-message "private" } static int f(char); }; diff --git a/gcc/testsuite/g++.dg/overload/defarg6.C b/gcc/testsuite/g++.dg/overload/defarg6.C index b750184c376..c5473aec307 100644 --- a/gcc/testsuite/g++.dg/overload/defarg6.C +++ b/gcc/testsuite/g++.dg/overload/defarg6.C @@ -1,7 +1,7 @@ class A { int i; - A(int i): i(i) {} // { dg-error "private" } + A(int i): i(i) {} // { dg-message "private" } }; void f (A = 1) { } // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/parse/access11.C b/gcc/testsuite/g++.dg/parse/access11.C index 7004fa76401..372d2aaea41 100644 --- a/gcc/testsuite/g++.dg/parse/access11.C +++ b/gcc/testsuite/g++.dg/parse/access11.C @@ -2,24 +2,24 @@ class A { union { - int i; // { dg-error "private" } + int i; // { dg-message "private" } }; union { - int j; // { dg-error "private" } + int j; // { dg-message "private" } }; union { union { - int k; // { dg-error "private" } + int k; // { dg-message "private" } }; union { union { - int l; // { dg-error "private" } + int l; // { dg-message "private" } }; union { - int m; // { dg-error "private" } + int m; // { dg-message "private" } union { - int n; // { dg-error "private" } - int o; // { dg-error "private" } + int n; // { dg-message "private" } + int o; // { dg-message "private" } }; }; }; diff --git a/gcc/testsuite/g++.dg/parse/access2.C b/gcc/testsuite/g++.dg/parse/access2.C index ee8cd234e07..6b8bccc603d 100644 --- a/gcc/testsuite/g++.dg/parse/access2.C +++ b/gcc/testsuite/g++.dg/parse/access2.C @@ -5,7 +5,7 @@ // Deferred access checking of variable declaration. class A { - typedef int X; // { dg-error "private" } + typedef int X; // { dg-message "private" } static X a, b, c; }; diff --git a/gcc/testsuite/g++.dg/parse/access3.C b/gcc/testsuite/g++.dg/parse/access3.C index 43303c95a94..7c8abff91b4 100644 --- a/gcc/testsuite/g++.dg/parse/access3.C +++ b/gcc/testsuite/g++.dg/parse/access3.C @@ -6,7 +6,7 @@ class A { private: - void f(); // { dg-error "private" } + void f(); // { dg-message "private" } }; class B { diff --git a/gcc/testsuite/g++.dg/parse/access4.C b/gcc/testsuite/g++.dg/parse/access4.C index d3870bd3497..57f8a11a232 100644 --- a/gcc/testsuite/g++.dg/parse/access4.C +++ b/gcc/testsuite/g++.dg/parse/access4.C @@ -6,7 +6,7 @@ class A { protected: - void foo() {} // { dg-error "protected" } + void foo() {} // { dg-message "protected" } public: A(); }; diff --git a/gcc/testsuite/g++.dg/parse/access5.C b/gcc/testsuite/g++.dg/parse/access5.C index cd1789eedda..5772c0d9311 100644 --- a/gcc/testsuite/g++.dg/parse/access5.C +++ b/gcc/testsuite/g++.dg/parse/access5.C @@ -7,7 +7,7 @@ struct A { protected: - int a; // { dg-error "protected" } + int a; // { dg-message "protected" } }; struct B : A diff --git a/gcc/testsuite/g++.dg/parse/access6.C b/gcc/testsuite/g++.dg/parse/access6.C index 33d50905854..cae5deec8f8 100644 --- a/gcc/testsuite/g++.dg/parse/access6.C +++ b/gcc/testsuite/g++.dg/parse/access6.C @@ -8,7 +8,7 @@ class A { public: - int foo() { return 1; } // { dg-error "inaccessible" } + int foo() { return 1; } // { dg-message "declared" } }; class B : public A diff --git a/gcc/testsuite/g++.dg/parse/access8.C b/gcc/testsuite/g++.dg/parse/access8.C index 205b7f2712a..42472def17c 100644 --- a/gcc/testsuite/g++.dg/parse/access8.C +++ b/gcc/testsuite/g++.dg/parse/access8.C @@ -2,7 +2,7 @@ class foo { - typedef int memfun; // { dg-error "private" } + typedef int memfun; // { dg-message "private" } }; template // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/parse/access9.C b/gcc/testsuite/g++.dg/parse/access9.C index 2c29016b047..4d41e50f9ed 100644 --- a/gcc/testsuite/g++.dg/parse/access9.C +++ b/gcc/testsuite/g++.dg/parse/access9.C @@ -1,5 +1,5 @@ // PR c++/24782 class Foo { public: typedef int type1; }; -class Bar { private: typedef Foo type2; }; // { dg-error "private" } +class Bar { private: typedef Foo type2; }; // { dg-message "private" } void g(Bar::type2::type1) {} // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/parse/crash40.C b/gcc/testsuite/g++.dg/parse/crash40.C index 6b67d8dfe10..df352dd7db5 100644 --- a/gcc/testsuite/g++.dg/parse/crash40.C +++ b/gcc/testsuite/g++.dg/parse/crash40.C @@ -10,7 +10,7 @@ struct C : A {}; class AA { - template void foo(); /* { dg-error "is private" } */ + template void foo(); /* { dg-message "private" } */ }; struct BB : AA {}; @@ -20,7 +20,7 @@ class AAA { struct BBB { static BBB *foo(); private: - int get() const {} /* { dg-error "is private" } */ + int get() const {} /* { dg-message "private" } */ }; template struct S { S(unsigned int = BBB::foo()->AAA::get()); /* { dg-error "is not a base of" } */ diff --git a/gcc/testsuite/g++.dg/tc1/dr142.C b/gcc/testsuite/g++.dg/tc1/dr142.C index c49f4dd20d3..25686446b26 100644 --- a/gcc/testsuite/g++.dg/tc1/dr142.C +++ b/gcc/testsuite/g++.dg/tc1/dr142.C @@ -2,10 +2,10 @@ // Origin: Giovanni Bajo // DR142: Injection-related errors in access example -class B { // { dg-error "inaccessible" } +class B { // { dg-message "declared" } public: - int mi; // { dg-error "inaccessible" } - static int si; // { dg-error "inaccessible" } + int mi; // { dg-message "declared" } + static int si; // { dg-message "declared" } }; class D: private B { diff --git a/gcc/testsuite/g++.dg/tc1/dr166.C b/gcc/testsuite/g++.dg/tc1/dr166.C index 7ca275ed92d..659a818f8cd 100644 --- a/gcc/testsuite/g++.dg/tc1/dr166.C +++ b/gcc/testsuite/g++.dg/tc1/dr166.C @@ -9,17 +9,17 @@ namespace N { namespace M { class A { friend void f(int); // N::f - static int x; // { dg-error "private" } + static int x; // { dg-message "private" } }; class B { template friend void f(T); // M::f - static int x; // { dg-error "private" } + static int x; // { dg-message "private" } }; class C { friend void g(); // M::g - static int x; // { dg-error "private" } + static int x; // { dg-message "private" } }; template void f(T) // will be instantiated as f diff --git a/gcc/testsuite/g++.dg/tc1/dr52.C b/gcc/testsuite/g++.dg/tc1/dr52.C index 4f4015dc958..7cff847023f 100644 --- a/gcc/testsuite/g++.dg/tc1/dr52.C +++ b/gcc/testsuite/g++.dg/tc1/dr52.C @@ -17,7 +17,7 @@ struct B1 : B {}; struct B2 : B {}; struct C -{ // { dg-error "C" } +{ // { dg-message "declared" } void foo(void); }; diff --git a/gcc/testsuite/g++.dg/template/access11.C b/gcc/testsuite/g++.dg/template/access11.C index 73e2caaf03f..9414d01798b 100644 --- a/gcc/testsuite/g++.dg/template/access11.C +++ b/gcc/testsuite/g++.dg/template/access11.C @@ -5,7 +5,7 @@ // Access checking during explicit instantiation. class A { - typedef int X; // { dg-error "private" } + typedef int X; // { dg-message "private" } }; class X { diff --git a/gcc/testsuite/g++.dg/template/access18.C b/gcc/testsuite/g++.dg/template/access18.C index 3338bc932ff..af3e0a3f0b8 100644 --- a/gcc/testsuite/g++.dg/template/access18.C +++ b/gcc/testsuite/g++.dg/template/access18.C @@ -1,10 +1,10 @@ // DR 401 class X { - typedef int a; // { dg-error "private" } - static const int b = 5; // { dg-error "private" } + typedef int a; // { dg-message "private" } + static const int b = 5; // { dg-message "private" } template - struct c; // { dg-error "private" } + struct c; // { dg-message "private" } }; template // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/template/access19.C b/gcc/testsuite/g++.dg/template/access19.C index 6420b1cbed1..251048c71f4 100644 --- a/gcc/testsuite/g++.dg/template/access19.C +++ b/gcc/testsuite/g++.dg/template/access19.C @@ -9,7 +9,7 @@ public: operator T&() { return value; } private: template< class U > - explicit_t( U t ); /* { dg-error "with U = char, T = int|is private" } */ + explicit_t( U t ); /* { dg-message "with U = char, T = int|private" } */ T value; }; diff --git a/gcc/testsuite/g++.dg/template/access2.C b/gcc/testsuite/g++.dg/template/access2.C index 0b4657d1a8a..0620c10f79d 100644 --- a/gcc/testsuite/g++.dg/template/access2.C +++ b/gcc/testsuite/g++.dg/template/access2.C @@ -9,8 +9,8 @@ template struct A { }; class B { - typedef int X; // { dg-error "private" } - static int i; // { dg-error "private" } + typedef int X; // { dg-message "private" } + static int i; // { dg-message "private" } }; int main() diff --git a/gcc/testsuite/g++.dg/template/access20.C b/gcc/testsuite/g++.dg/template/access20.C index ebf575e6c30..8065615bcb8 100644 --- a/gcc/testsuite/g++.dg/template/access20.C +++ b/gcc/testsuite/g++.dg/template/access20.C @@ -3,7 +3,7 @@ template struct B { protected: - T v; // { dg-error "protected" } + T v; // { dg-message "protected" } }; template struct D : B { diff --git a/gcc/testsuite/g++.dg/template/access26.C b/gcc/testsuite/g++.dg/template/access26.C index 1c5de9a8fd2..b17baa71cab 100644 --- a/gcc/testsuite/g++.dg/template/access26.C +++ b/gcc/testsuite/g++.dg/template/access26.C @@ -2,5 +2,5 @@ template < typename T > struct A { static int i; }; -class B { typedef int X; }; // { dg-error "private" } +class B { typedef int X; }; // { dg-message "private" } void f() { A::i = 0; } // { dg-error "this context" } diff --git a/gcc/testsuite/g++.dg/template/access3.C b/gcc/testsuite/g++.dg/template/access3.C index ab56620772e..2b456b1901a 100644 --- a/gcc/testsuite/g++.dg/template/access3.C +++ b/gcc/testsuite/g++.dg/template/access3.C @@ -8,7 +8,7 @@ template struct A { }; class B { - template class X {}; // { dg-error "private" } + template class X {}; // { dg-message "private" } }; int main() diff --git a/gcc/testsuite/g++.dg/template/access7.C b/gcc/testsuite/g++.dg/template/access7.C index 7d1812732c3..b477e5a10f7 100644 --- a/gcc/testsuite/g++.dg/template/access7.C +++ b/gcc/testsuite/g++.dg/template/access7.C @@ -5,7 +5,7 @@ template class S { - class T {}; // { dg-error "private" } + class T {}; // { dg-message "private" } }; template diff --git a/gcc/testsuite/g++.dg/template/conv12.C b/gcc/testsuite/g++.dg/template/conv12.C index e6af05481d7..dea72d6c44b 100644 --- a/gcc/testsuite/g++.dg/template/conv12.C +++ b/gcc/testsuite/g++.dg/template/conv12.C @@ -16,7 +16,7 @@ struct C2 { private: template - operator T(); // { dg-error "private" } + operator T(); // { dg-message "private" } public: operator bool() { return false; } } c2; diff --git a/gcc/testsuite/g++.dg/template/crash69.C b/gcc/testsuite/g++.dg/template/crash69.C index 957f1e19ba3..badf70bd0e4 100644 --- a/gcc/testsuite/g++.dg/template/crash69.C +++ b/gcc/testsuite/g++.dg/template/crash69.C @@ -2,7 +2,7 @@ template class A { - static int i; // { dg-error "is private" } + static int i; // { dg-message "private" } friend int T::foo(); // { dg-error "does not match" } }; diff --git a/gcc/testsuite/g++.dg/template/friend31.C b/gcc/testsuite/g++.dg/template/friend31.C index 5e60540b693..2be5600810e 100644 --- a/gcc/testsuite/g++.dg/template/friend31.C +++ b/gcc/testsuite/g++.dg/template/friend31.C @@ -10,7 +10,7 @@ template struct F; // { dg-message "previous declaratio class W { template friend class F; // { dg-error "template parameter" } - int x; // { dg-error "private" } + int x; // { dg-message "private" } }; template struct F diff --git a/gcc/testsuite/g++.dg/template/friend32.C b/gcc/testsuite/g++.dg/template/friend32.C index d5b78e05807..94bff37776f 100644 --- a/gcc/testsuite/g++.dg/template/friend32.C +++ b/gcc/testsuite/g++.dg/template/friend32.C @@ -7,7 +7,7 @@ template class A { - void f (); // { dg-error "private" } + void f (); // { dg-message "private" } }; template class B diff --git a/gcc/testsuite/g++.dg/template/memfriend15.C b/gcc/testsuite/g++.dg/template/memfriend15.C index a620c3b15ce..f0410a96b04 100644 --- a/gcc/testsuite/g++.dg/template/memfriend15.C +++ b/gcc/testsuite/g++.dg/template/memfriend15.C @@ -17,7 +17,7 @@ template struct A }; class C { - int i; // { dg-error "private" } + int i; // { dg-message "private" } template friend struct A::B1; }; diff --git a/gcc/testsuite/g++.dg/template/memfriend16.C b/gcc/testsuite/g++.dg/template/memfriend16.C index 1276970e344..111f8c83dd1 100644 --- a/gcc/testsuite/g++.dg/template/memfriend16.C +++ b/gcc/testsuite/g++.dg/template/memfriend16.C @@ -17,7 +17,7 @@ template struct A }; class C { - int i; // { dg-error "private" } + int i; // { dg-message "private" } template template friend struct A::B1; }; diff --git a/gcc/testsuite/g++.dg/template/memfriend17.C b/gcc/testsuite/g++.dg/template/memfriend17.C index 5f4b8e7b379..f08a8d6b75f 100644 --- a/gcc/testsuite/g++.dg/template/memfriend17.C +++ b/gcc/testsuite/g++.dg/template/memfriend17.C @@ -18,7 +18,7 @@ template class F1 { friend class A::B; - enum { foo = 0 }; // { dg-error "private" } + enum { foo = 0 }; // { dg-message "private" } }; template diff --git a/gcc/testsuite/g++.dg/template/memfriend7.C b/gcc/testsuite/g++.dg/template/memfriend7.C index 26ca6d8e9f0..2659a1a2191 100644 --- a/gcc/testsuite/g++.dg/template/memfriend7.C +++ b/gcc/testsuite/g++.dg/template/memfriend7.C @@ -15,7 +15,7 @@ template struct A { }; class C { - int ii; // { dg-error "private" } + int ii; // { dg-message "private" } template template friend void A::f(V); template friend void A::g(); diff --git a/gcc/testsuite/g++.dg/template/pr32519.C b/gcc/testsuite/g++.dg/template/pr32519.C index e93c7b4761d..a010a5695b2 100644 --- a/gcc/testsuite/g++.dg/template/pr32519.C +++ b/gcc/testsuite/g++.dg/template/pr32519.C @@ -4,7 +4,7 @@ struct B { protected: - template void f (); // { dg-error "protected" } + template void f (); // { dg-message "protected" } }; struct D : public B diff --git a/gcc/testsuite/g++.dg/template/qualttp21.C b/gcc/testsuite/g++.dg/template/qualttp21.C index 00fcf40c45c..9abdf653b6d 100644 --- a/gcc/testsuite/g++.dg/template/qualttp21.C +++ b/gcc/testsuite/g++.dg/template/qualttp21.C @@ -8,7 +8,7 @@ class foo { public: foo() {} protected: - ~foo() {} // { dg-error "~foo" } + ~foo() {} // { dg-message "protected" } }; int main() diff --git a/gcc/testsuite/g++.dg/template/qualttp8.C b/gcc/testsuite/g++.dg/template/qualttp8.C index c1396dbad02..40491a4c9eb 100644 --- a/gcc/testsuite/g++.dg/template/qualttp8.C +++ b/gcc/testsuite/g++.dg/template/qualttp8.C @@ -11,7 +11,7 @@ template struct D { struct E { private: - template class B {}; // { dg-error "private" } + template class B {}; // { dg-message "private" } }; D d; // { dg-message "required" } diff --git a/gcc/testsuite/g++.dg/template/ttp10.C b/gcc/testsuite/g++.dg/template/ttp10.C index 09bdb1a8467..2aafc233036 100644 --- a/gcc/testsuite/g++.dg/template/ttp10.C +++ b/gcc/testsuite/g++.dg/template/ttp10.C @@ -9,8 +9,8 @@ template struct Template {}; template class D> struct B { - static void foo1(const D *); // { dg-error "const" } - static void foo2(volatile D *);// { dg-error "volatile" } + static void foo1(const D *); // { dg-message "declared" } + static void foo2(volatile D *);// { dg-message "declared" } }; class E : protected B