-
- Downloads
c++: Add -Wexceptions warning option [PR97675]
This PR asks that we add a warning option for an existing (very old) warning, so that it can be disabled selectively. clang++ uses -Wexceptions for this, so I added this new option rather than using e.g. -Wnoexcept. gcc/c-family/ChangeLog: PR c++/97675 * c.opt (Wexceptions): New option. gcc/cp/ChangeLog: PR c++/97675 * except.c (check_handlers_1): Use OPT_Wexceptions for the warning. Use inform for the second part of the warning. gcc/ChangeLog: PR c++/97675 * doc/invoke.texi: Document -Wexceptions. gcc/testsuite/ChangeLog: PR c++/97675 * g++.old-deja/g++.eh/catch10.C: Adjust dg-warning. * g++.dg/warn/Wexceptions1.C: New test. * g++.dg/warn/Wexceptions2.C: New test.
Showing
- gcc/c-family/c.opt 4 additions, 0 deletionsgcc/c-family/c.opt
- gcc/cp/except.c 4 additions, 5 deletionsgcc/cp/except.c
- gcc/doc/invoke.texi 7 additions, 1 deletiongcc/doc/invoke.texi
- gcc/testsuite/g++.dg/warn/Wexceptions1.C 9 additions, 0 deletionsgcc/testsuite/g++.dg/warn/Wexceptions1.C
- gcc/testsuite/g++.dg/warn/Wexceptions2.C 10 additions, 0 deletionsgcc/testsuite/g++.dg/warn/Wexceptions2.C
- gcc/testsuite/g++.old-deja/g++.eh/catch10.C 2 additions, 2 deletionsgcc/testsuite/g++.old-deja/g++.eh/catch10.C
Loading
Please register or sign in to comment