This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC/RFHelp: c-decl.c rewrite - almost but not quite


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

> Specifying that it has no parameters is not the same as giving it a
> prototype type; it is simply contrasting with other empty lists that give
> no information at all.  Any definition with an identifier list specifies
> the parameters without giving a prototype type.  (6.9.1#7 says that a
> definition *with a parameter type list* serves as a prototype for the rest
> of that translation unit.)  We've been through this before in PR 6326.  
> Only parameter type lists give functions a type with a prototype.

I think that both here and in 6326 you are making a distinction
without a difference.  I think we're allowed to reject the sample
translation unit in 6326 (compile-time undefined behavior) and I don't
see value in treating () in a function definition differently from (void).

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]