Hi, As previously announced, here is a patch that deprecate access declarations . I did a little tour in the GCC museum old-deja --and in g++.dg as well -- to disinter and adjust those dusty tests. To avoid false positive on invalid code, I have decided to only emit the warning if the access declaration is actually valid. Bootstrapped/Tested x86_64-unknown-linux-gnu, OK to commit ?
gcc/testsuite/ChangeLog 2011-12-28 Fabien Chêne <fab...@gcc.gnu.org> * g++.old-deja/g++.brendan/crash25.C: Adjust. * g++.old-deja/g++.brendan/crash56.C: Likewise. * g++.old-deja/g++.jason/access14.C: Likewise. * g++.old-deja/g++.jason/access8.C: Likewise. * g++.old-deja/g++.jason/access1.C: Likewise. * g++.old-deja/g++.other/access3.C: Likewise. * g++.old-deja/g++.other/access5.C: Likewise. * g++.old-deja/g++.law/unsorted1.C: Likewise. * g++.old-deja/g++.law/visibility22.C: Likewise. * g++.old-deja/g++.law/visibility26.C: Likewise. * g++.old-deja/g++.mike/p2746.C: Likewise. * g++.dg/debug/using1.C: Likewise. * g++.dg/lookup/using51.C: Likewise. * g++.dg/inherit/using5.C: Likewise. * g++.dg/inherit/pr30297.C: Likewise. * g++.dg/inherit/access8.C: Likewise. * g++.dg/torture/pr39362.C: Likewise. * g++.dg/template/crash13.C: Likewise. * g++.dg/template/using10.C: Likewise. gcc/cp/ChangeLog 2011-12-28 Fabien Chêne <fab...@gcc.gnu.org> * parser.c (cp_parser_using_declaration): Add a warning about deprecated access declarations when no errors were encountered while parsing the access declaration. Save the first token in order to emit the warning at the right place. -- Fabien
access_decls_deprecation.patch
Description: Binary data