Patchwork [DOC] Amend designated inits doc (PR c/39525)

login
register
mail settings
Submitter Marek Polacek
Date March 25, 2014, 10 p.m.
Message ID <20140325220054.GV6523@redhat.com>
Download mbox | patch
Permalink /patch/333731/
State New
Headers show

Comments

Marek Polacek - March 25, 2014, 10 p.m.
Apparently some users would like to see what happens to omitted field
members when initializing a structure in GCC docs.

Ok for trunk?

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

	PR c/39525
	* doc/extend.texi (Designated Inits): Describe what happens to omitted
	field members.


	Marek
Joseph S. Myers - March 25, 2014, 10:03 p.m.
On Tue, 25 Mar 2014, Marek Polacek wrote:

> Apparently some users would like to see what happens to omitted field
> members when initializing a structure in GCC docs.
> 
> Ok for trunk?
> 
> 2014-03-25  Marek Polacek  <polacek@redhat.com>
> 
> 	PR c/39525
> 	* doc/extend.texi (Designated Inits): Describe what happens to omitted
> 	field members.

OK.

Patch

diff --git gcc/doc/extend.texi gcc/doc/extend.texi
index c0da713..90bf6d8 100644
--- gcc/doc/extend.texi
+++ gcc/doc/extend.texi
@@ -1967,6 +1967,9 @@  Another syntax that has the same meaning, obsolete since GCC 2.5, is
 struct point p = @{ y: yvalue, x: xvalue @};
 @end smallexample
 
+Omitted field members are implicitly initialized the same as objects
+that have static storage duration.
+
 @cindex designators
 The @samp{[@var{index}]} or @samp{.@var{fieldname}} is known as a
 @dfn{designator}.  You can also use a designator (or the obsolete colon