public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [DOC PATCH] Clarify docs about stmt exprs (PR c/51088)
@ 2014-03-28 14:48 Marek Polacek
  2014-03-28 14:52 ` Joseph S. Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Polacek @ 2014-03-28 14:48 UTC (permalink / raw)
  To: GCC Patches

PR51088 contains some Really Bizzare code.  We should tell users
not to do any shenanigans like that.

Ok for trunk?

2014-03-28  Marek Polacek  <polacek@redhat.com>

	PR c/51088
	* doc/extend.texi (Statement Exprs): Add note about taking
	addresses of labels inside of statement expressions.

diff --git gcc/doc/extend.texi gcc/doc/extend.texi
index f9114ab..215d0a2 100644
--- gcc/doc/extend.texi
+++ gcc/doc/extend.texi
@@ -206,6 +206,9 @@ Jumping into a statement expression with @code{goto} or using a
 @code{case} or @code{default} label inside the statement expression is
 not permitted.  Jumping into a statement expression with a computed
 @code{goto} (@pxref{Labels as Values}) has undefined behavior.
+Taking the address of a label declared inside of a statement
+expression from outside of the statement expression has undefined
+behavior.
 Jumping out of a statement expression is permitted, but if the
 statement expression is part of a larger expression then it is
 unspecified which other subexpressions of that expression have been

	Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-18  5:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 14:48 [DOC PATCH] Clarify docs about stmt exprs (PR c/51088) Marek Polacek
2014-03-28 14:52 ` Joseph S. Myers
2014-04-08 16:23   ` Marek Polacek
2014-05-01 17:21     ` Joseph S. Myers
2014-07-18  5:05     ` Jeff Law

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).