Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #395463
| From | Michael S <already5chosen@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: What is the meaning of array parameters? |
| Date | 2025-11-25 16:04 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <20251125160441.00003007@yahoo.com> (permalink) |
| References | <10g4au7$jc8o$1@solani.org> |
On Tue, 25 Nov 2025 14:28:39 +0100
Philipp Klaus Krause <pkk@spth.de> wrote:
> Since C99 we have four types of array parameters:
>
> []
> [assignment-expression]
> [static assignment-expression]
> [*]
>
> But what is their meaning? They're all compatible, they all decay to
> pointers anyway. Only to [static assignment-expression] does the
> standard give a little bit of extra formal meaning, by making it UB
> when a too-short array is passed.
>
> They exist, they are different types, but the standard does not give
> them meaning (with the exception noted above). So people using them
> must have a motivation beyond what is explicitly stated in the
> standard, and thus an idea of what the meaning of these would or
> should be.
>
> Philipp
>
May be, The Standard could allow (or even recommend?) diagnostic for
code like below?
int foo(int prm[2])
{
return prm[2];
}
Other than that, there is hardly any meaning.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the meaning of array parameters? Philipp Klaus Krause <pkk@spth.de> - 2025-11-25 14:28 +0100
Re: What is the meaning of array parameters? Michael S <already5chosen@yahoo.com> - 2025-11-25 16:04 +0200
Re: What is the meaning of array parameters? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-11-25 13:25 -0800
Re: What is the meaning of array parameters? Philipp Klaus Krause <pkk@spth.de> - 2025-11-27 10:34 +0100
Re: What is the meaning of array parameters? antispam@fricas.org (Waldek Hebisch) - 2025-11-29 22:28 +0000
Re: What is the meaning of array parameters? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-11-29 22:01 -0500
Re: What is the meaning of array parameters? Andrey Tarasevich <noone@noone.net> - 2025-12-05 06:01 -0800
Re: What is the meaning of array parameters? Lynn McGuire <lynnmcguire5@gmail.com> - 2025-12-05 15:36 -0600
csiph-web