This is the mail archive of the gcc-bugs@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: ANSI C, type composition, constant arrays in function arguments


Thanks Andreas pointing me to part of the standard that I have missed.
However, is it crystal clear in the following parts of the document we
are talking about parameters and a return type *after adjustment*?

 To be honest, I would still vote for at least a warning. After all,
what is the point of writing a constant size for an array parameter if
the typechecker throws it away?

mikolas

2008/9/22 Andreas Schwab <schwab@suse.de>:
> "MikolÃÅ Janota" <mikolas.janota@gmail.com> writes:
>
>>  However, the following declarations
>> void p(int p[30]);
>> void p(int p[4]);
>>
>> do not yield a warning.
>
> See 6.7.5.3#7.
>
> Andreas.
>
> --
> Andreas Schwab, SuSE Labs, schwab@suse.de
> SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
> PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>



-- 
MikolÃÅ Janota M. Sc.
School of Computer Science and Informatics,
University College Dublin,
Belfield,
Dublin 4,
Ireland

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