PR c++/91361 * c-opts.c (c_common_post_options): Enable -Wvolatile by default for C++2a, unless -Wno-deprecated. * c.opt (Wvolatile): New warning. * cp-gimplify.c (cp_fold): Set TREE_THIS_VOLATILE. * decl.c (grokdeclarator): Warn about a volatile-qualified structured binding and return type. (grokparms): Warn about a volatile-qualified function parameter. * expr.c (mark_use) <case MODIFY_EXPR>: Emit a -Wvolatile warning. * typeck.c (cp_build_unary_op): Emit a -Wvolatile warning for pre and post ++/-- on a volatile operand. (genericize_compound_lvalue): Use a better location. Don't lose TREE_THIS_VOLATILE. (cp_build_modify_expr): Emit a -Wvolatile warning for a compound assignment whose LHS is volatile-qualified. Build the assignment with a more precise location. * doc/invoke.texi: Document -Wvolatile. * c-c++-common/Wbool-operation-1.c: Use -Wno-volatile in C++. * c-c++-common/gomp/atomic-1.c: Likewise. * c-c++-common/gomp/atomic-9.c: Likewise. * c-c++-common/gomp/depend-iterator-1.c: Likewise. * c-c++-common/gomp/loop-1.c: Adjust warning location for C++. * c-c++-common/gomp/order-3.c: Likewise. * c-c++-common/pr69733.c: Use -Wno-volatile in C++. * c-c++-common/spec-barrier-2.c: Likewise. * c-c++-common/tm/pr54893.c: Likewise. * g++.dg/cpp0x/pr65327.C: Add dg-warning. * g++.dg/cpp0x/rv-conv2.C: Likewise. * g++.dg/cpp0x/rv1n.C: Likewise. * g++.dg/cpp0x/rv1p.C: Likewise. * g++.dg/cpp0x/rv2n.C: Likewise. * g++.dg/cpp0x/rv2p.C: Likewise. * g++.dg/cpp0x/rv3n.C: Likewise. * g++.dg/cpp0x/rv3p.C: Likewise. * g++.dg/cpp0x/rv4n.C: Likewise. * g++.dg/cpp0x/rv4p.C: Likewise. * g++.dg/cpp0x/rv5n.C: Likewise. * g++.dg/cpp0x/rv5p.C: Likewise. * g++.dg/cpp0x/rv6n.C: Likewise. * g++.dg/cpp0x/rv6p.C: Likewise. * g++.dg/cpp0x/rv7n.C: Likewise. * g++.dg/cpp0x/rv7p.C: Likewise. * g++.dg/cpp0x/rv8p.C: Likewise. * g++.dg/cpp0x/trailing14.C: Use -Wno-volatile. * g++.dg/cpp1y/new1.C: Add dg-warning. * g++.dg/cpp2a/volatile1.C: New test. * g++.dg/cpp2a/volatile2.C: New test. * g++.dg/cpp2a/volatile3.C: New test. * g++.dg/cpp2a/volatile4.C: New test. * g++.dg/expr/bool3.C: Add dg-warning. * g++.dg/expr/bool4.C: Likewise. * g++.dg/expr/cond9.C: Likewise. * g++.dg/ext/vector25.C: Likewise. * g++.dg/gomp/depend-iterator-1.C: Use -Wno-volatile. * g++.dg/inherit/covariant21.C: Add dg-warning. * g++.dg/init/ref18.C: Likewise. * g++.dg/ipa/pr63838.C: Likewise. * g++.dg/overload/rvalue2.C: Likewise. * g++.dg/parse/semicolon4.C: Likewise. * g++.dg/warn/Wreturn-type-4.C: Likewise. * g++.dg/warn/pr36069.C: Likewise. * g++.old-deja/g++.mike/p9506.C: Likewise. * g++.old-deja/g++.other/volatile1.C: Likewise. From-SVN: r275022
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| avr-mmcu.texi | Loading commit data... | |
| bugreport.texi | Loading commit data... | |
| cfg.texi | Loading commit data... | |
| collect2.texi | Loading commit data... | |
| compat.texi | Loading commit data... | |
| configfiles.texi | Loading commit data... | |
| configterms.texi | Loading commit data... | |
| contrib.texi | Loading commit data... | |
| contribute.texi | Loading commit data... | |
| cpp.texi | Loading commit data... | |
| cppdiropts.texi | Loading commit data... | |
| cppenv.texi | Loading commit data... | |
| cppinternals.texi | Loading commit data... | |
| cppopts.texi | Loading commit data... | |
| cppwarnopts.texi | Loading commit data... | |
| extend.texi | Loading commit data... | |
| fragments.texi | Loading commit data... | |
| frontends.texi | Loading commit data... | |
| gcc.texi | Loading commit data... | |
| gccint.texi | Loading commit data... | |
| gcov-dump.texi | Loading commit data... | |
| gcov-tool.texi | Loading commit data... | |
| gcov.texi | Loading commit data... | |
| generic.texi | Loading commit data... | |
| gimple.texi | Loading commit data... | |
| gnu.texi | Loading commit data... | |
| gty.texi | Loading commit data... | |
| headerdirs.texi | Loading commit data... | |
| hostconfig.texi | Loading commit data... | |
| implement-c.texi | Loading commit data... | |
| implement-cxx.texi | Loading commit data... | |
| install-old.texi | Loading commit data... | |
| install.texi | Loading commit data... | |
| install.texi2html | Loading commit data... | |
| interface.texi | Loading commit data... | |
| invoke.texi | Loading commit data... | |
| languages.texi | Loading commit data... | |
| libgcc.texi | Loading commit data... | |
| loop.texi | Loading commit data... | |
| lto-dump.texi | Loading commit data... | |
| lto.texi | Loading commit data... | |
| makefile.texi | Loading commit data... | |
| match-and-simplify.texi | Loading commit data... | |
| md.texi | Loading commit data... | |
| objc.texi | Loading commit data... | |
| optinfo.texi | Loading commit data... | |
| options.texi | Loading commit data... | |
| passes.texi | Loading commit data... | |
| plugins.texi | Loading commit data... | |
| poly-int.texi | Loading commit data... | |
| portability.texi | Loading commit data... | |
| rtl.texi | Loading commit data... | |
| service.texi | Loading commit data... | |
| sourcebuild.texi | Loading commit data... | |
| standards.texi | Loading commit data... | |
| tm.texi | Loading commit data... | |
| tm.texi.in | Loading commit data... | |
| tree-ssa.texi | Loading commit data... | |
| trouble.texi | Loading commit data... | |
| ux.texi | Loading commit data... |