From: Martin Liska Date: Sun, 13 Nov 2022 21:01:20 +0000 (+0100) Subject: Partially revert 7e3ce73849fef8b50efb427ec96f317e88c0e6cf X-Git-Tag: basepoints/gcc-14~3208 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1191a412bb17a734c58716237382a8348b057546;p=thirdparty%2Fgcc.git Partially revert 7e3ce73849fef8b50efb427ec96f317e88c0e6cf gcc/ChangeLog: * doc/gcc/gcc-command-options/options-controlling-c++-dialect.rst: Revert. --- 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 9bfb1ccff662..5b05d31aae9c 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`.