From 1191a412bb17a734c58716237382a8348b057546 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sun, 13 Nov 2022 22:01:20 +0100 Subject: Partially revert 7e3ce73849fef8b50efb427ec96f317e88c0e6cf gcc/ChangeLog: * doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst: Revert. --- .../gcc-command-options/options-controlling-c++-dialect.rst | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gcc/doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst b/gcc/doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst index 9bfb1cc..5b05d31 100644 --- a/gcc/doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst +++ b/gcc/doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst @@ -855,16 +855,6 @@ In addition, these warning options have meanings only for C++ programs: const T& foo (const T&) { ... } #pragma GCC diagnostic pop - :option:`-Wdangling-reference` also warns about code like - - .. code-block:: c++ - - auto p = std::minmax(1, 2); - - where ``std::minmax`` returns ``std::pair``, and - both references dangle after the end of the full expression that contains - the call to `std::minmax``. - This warning is enabled by :option:`-Wall`. .. option:: -Wno-dangling-reference @@ -2140,4 +2130,4 @@ In addition, these warning options have meanings only for C++ programs: .. option:: -Wconversion-null - Default setting; overrides :option:`-Wno-conversion-null`. \ No newline at end of file + Default setting; overrides :option:`-Wno-conversion-null`. -- cgit v1.1