This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 4.0 release notes patch: arrays of incomplete type
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Feb 2005 21:35:01 -0500
- Subject: Re: 4.0 release notes patch: arrays of incomplete type
- References: <Pine.LNX.4.61.0502260206240.13707@digraph.polyomino.org.uk>
On Feb 25, 2005, at 9:07 PM, Joseph S. Myers wrote:
Arrays of incomplete type seem fairly common in real code, so this
patch
to the 4.0 release notes mentions that they are no longer accepted and
indicates fixes for two common cases. Committed.
Index: gcc-4.0/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.0/changes.html,v
retrieving revision 1.30
diff -u -r1.30 changes.html
--- gcc-4.0/changes.html 10 Feb 2005 20:00:34 -0000 1.30
+++ gcc-4.0/changes.html 26 Feb 2005 02:05:26 -0000
@@ -124,6 +124,12 @@
<li>Taking the address of a variable with <code>register</code>
storage is invalid in C. GCC now issues an error instead of a
warning.</li>
+ <li>Arrays of incomplete element type are invalid in C. GCC now
+ issues an error for such arrays. Declarations such as
+ <code>extern struct s x[];</code> (where <code>struct s</code>
+ has not been defined) can be moved after the definition of
+ <code>struct s</code>. Function parameters declared as
+ arrays of incomplete type can instead be declared as
pointers.</li>
</ul>
<h3>C++</h3>
And you also add Objective-C since this also effects Objective-C?
Thanks,
Andrew Pinski