* [wwwdocs] Correct notes about -Wreturn-type change for C++
@ 2018-04-25 12:01 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2018-04-25 12:01 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
It's always been ill-formed to say "return;" in a non-void function,
the change in GCC 8 is when control flows of the end of a function.
This corrects the release notes.
Committed to CVS.
[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 757 bytes --]
Index: htdocs/gcc-8/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v
retrieving revision 1.69
diff -u -r1.69 changes.html
--- htdocs/gcc-8/changes.html 24 Apr 2018 20:36:28 -0000 1.69
+++ htdocs/gcc-8/changes.html 25 Apr 2018 11:40:26 -0000
@@ -716,9 +716,10 @@
</pre>
</li>
- <li>A return statement without an operand in a non-void function
+ <li>Flowing off the end of a non-void function
is considered unreachable and may be subject to optimization
- on that basis.</li>
+ on that basis. As a result of this change, <code>-Wreturn-type</code>
+ warnings are enabled by default for C++.</li>
</ul>
<h4 id="libstdcxx">Runtime Library (libstdc++)</h4>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-25 11:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 12:01 [wwwdocs] Correct notes about -Wreturn-type change for C++ Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).