This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PR 19333
On Fri, 14 Jan 2005, Mark Mitchell wrote:
> Neil Booth wrote:
> > IMO it should never get further than that.
> 100% agreed. This is just a front-end bug.
Originally the (undocumented) extension was unconditional, with #if 0 code
to generate a warning under certain conditions. I then made it a
<http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00010.html> to implement the
requirement in C99 for this to be diagnosed (as in C90 the requirement for
arrays to be of object types wasn't in the Constraints, so undefined in
C90 with no diagnostic required). I see no reason not to change this to
an unconditional error (with of course a testcase that it now is such an
error, e.g. the testcase from the PR in question), also making the type
error_mark_node if necessary; even in the case where array-to-pointer
conversion of parameters is applied so the converted parameter declaration
could have been written as valid C, the declaration involving an array of
incomplete type has never been valid C. The fact that the compiler
crashes for this invalid code makes a case for not using a deprecation
period for this extension but just removing it.
In general I think every test of "pedantic" (in any front end) should
correspond to documentation of some extension, or be removed to make the
conditioned code unconditional, and every use of pedwarn should be
documented as an extension (that it isn't unconditionally an error) or
replaced by a hard error.
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
firstname.lastname@example.org (personal mail)
email@example.com (CodeSourcery mail)
firstname.lastname@example.org (Bugzilla assignments and CCs)