This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
4.0 release notes patch: arrays of incomplete type
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 26 Feb 2005 02:07:36 +0000 (UTC)
- Subject: 4.0 release notes patch: arrays of incomplete type
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>
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)