I've noticed that both arguments of fopen are restrict-qualified.
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are restrict-qualified.
What I think you mean is that the arguments given in the prototype declaration in the C standard are qualified with the 'restrict'
keyword.
Note that this form of declaration has no effect on the semantics of
the function. The function declaration, and its semantics, are just
the same as if the uses of 'restrict' were removed.
On 2023-07-20 19:17, Tim Rentsch wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are restrict-qualified.
What I think you mean is that the arguments given in the prototype
declaration in the C standard are qualified with the 'restrict'
keyword.
Note that this form of declaration has no effect on the semantics of
the function. The function declaration, and its semantics, are just
the same as if the uses of 'restrict' were removed.
Note that Tim's critique or restrict in May 2023 is very similar to the critique of the similar noalias proposal in messageid <7753@alice.UUCP>
by someone highly respected in this group. That was posted 35 years
ago.
On 2023-07-20 19:17, Tim Rentsch wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are restrict-qualified.
What I think you mean is that the arguments given in the prototype
declaration in the C standard are qualified with the 'restrict'
keyword.
Note that this form of declaration has no effect on the semantics
of the function. The function declaration, and its semantics, are
just the same as if the uses of 'restrict' were removed.
Note that Tim's critique or restrict in May 2023 is very similar
to the critique of the similar noalias proposal in messageid <7753@alice.UUCP> [...]
On 2023-07-21, Jakob Bohm <jb-usenet@wisemo.com.invalid> wrote:
On 2023-07-20 19:17, Tim Rentsch wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are restrict-qualified.
What I think you mean is that the arguments given in the prototype
declaration in the C standard are qualified with the 'restrict'
keyword.
Note that this form of declaration has no effect on the semantics
of the function. The function declaration, and its semantics, are
just the same as if the uses of 'restrict' were removed.
Note that Tim's critique or restrict in May 2023 is very similar
to the critique of the similar noalias proposal in messageid
<7753@alice.UUCP> by someone highly respected in this group.
That was posted 35 years ago.
That someone was even opposed to const, for some good reasons.
The present issue reveals a design flaw in the C type system:
that qualifiers on function parameters don't matter.
They should, though.
void f(const int);
void f(int);
should be incomaptible and diagnosed!
Kaz Kylheku <864-117-4973@kylheku.com> writes:
On 2023-07-21, Jakob Bohm <jb-usenet@wisemo.com.invalid> wrote:
On 2023-07-20 19:17, Tim Rentsch wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are restrict-qualified.
What I think you mean is that the arguments given in the prototype
declaration in the C standard are qualified with the 'restrict'
keyword.
Note that this form of declaration has no effect on the semantics
of the function. The function declaration, and its semantics, are
just the same as if the uses of 'restrict' were removed.
Note that Tim's critique or restrict in May 2023 is very similar
to the critique of the similar noalias proposal in messageid
<7753@alice.UUCP> by someone highly respected in this group.
That was posted 35 years ago.
That someone was even opposed to const, for some good reasons.
The present issue reveals a design flaw in the C type system:
that qualifiers on function parameters don't matter.
They should, though.
void f(const int);
void f(int);
should be incomaptible and diagnosed!
A foolish consistency is the hobgoblin of little minds.
On 2023-07-25, Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
On 2023-07-21, Jakob Bohm <jb-usenet@wisemo.com.invalid> wrote:
On 2023-07-20 19:17, Tim Rentsch wrote:
Kaz Kylheku <864-117-4973@kylheku.com> writes:
I've noticed that both arguments of fopen are
restrict-qualified.
What I think you mean is that the arguments given in the
prototype declaration in the C standard are qualified with
the 'restrict' keyword.
Note that this form of declaration has no effect on the
semantics of the function. The function declaration, and its
semantics, are just the same as if the uses of 'restrict'
were removed.
Here is a realistic plan.
Phase 1:
[...]
Phase 2:
[...]
Phase 3:
[...]
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 351 |
Nodes: | 16 (2 / 14) |
Uptime: | 43:46:26 |
Calls: | 7,634 |
Files: | 12,799 |
Messages: | 5,690,252 |