Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #103562
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Using fread function |
| Date | 2017-02-09 12:10 -0800 |
| Organization | None to speak of |
| Message-ID | <lnk28zxgzd.fsf@kst-u.example.com> (permalink) |
| References | (4 earlier) <kfn37fn7ve2.fsf@x-alumni2.alumni.caltech.edu> <28dc26c8-8063-4334-9850-b1a5ba7876f3@googlegroups.com> <d0e4b764-cef7-41d1-af6c-9b71a2ae323c@googlegroups.com> <lnwpczxowx.fsf@kst-u.example.com> <ac73adab-30f6-42f6-b243-01b361645a03@googlegroups.com> |
supercat@casperkitty.com writes:
> On Thursday, February 9, 2017 at 11:19:16 AM UTC-6, Keith Thompson wrote:
>> Are you suggesting that an implementation that doesn't do anything
>> useful with "restrict" should be able to ignore it altogether, so that
>>
>> int n = restrict 42;
>>
>> would be quietly treated as a valid declaration? Or that an
>> implementation that ignores register should allow the address of a
>> register-qualified object to be taken?
>>
>> If so, why?
>>
>> If I write code that uses "register" or "restrict", I want my compiler
>> to check my code for validity, whether they have any semantic impact or
>> not.
>
> If an implementation isn't going to do anything useful with "restrict",
> would it be more useful to have the authors spend a day or more adding
> logic to deal with all the places where the keyword is or is not allowed
> to appear syntactically, or would it be more useful to have the author
> spend a day on some other feature which would improve the behavior of
> programs that can actually run?
Rhetorical questions ignored.
> I would not disagree that--all else being equal--an implementation which
> ensured that "restrict" was only used in spots where it is legal could
> be regarded as being of higher quality than one which will accept it just
> about anywhere, but if in the judgment of the implementer the time that
> would be required to achieve that could be more usefully spent in some
> other fashion, I would not regard the value of having compilers validate
> the usage of "restrict" as being so enormous as to justify overriding the
> implementer's judgment.
That time has already been spent. All conforming C99 and C11 compilers
recognize the "restrict" keyword and handle it correctly, diagnosing any
uses of it that are syntactically incorrect. I presume it wasn't at all
difficult. I oppose fragmenting the language in the manner you
advocate.
[snip]
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using fread function janus <emekamicro@gmail.com> - 2017-01-29 10:07 -0800
Re: Using fread function "James R. Kuyper" <jameskuyper@verizon.net> - 2017-01-29 14:31 -0500
Re: Using fread function supercat@casperkitty.com - 2017-01-30 08:03 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-01 13:59 -0800
Re: Using fread function jameskuyper@verizon.net - 2017-02-05 11:40 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-08 22:04 -0800
Re: Using fread function jameskuyper@verizon.net - 2017-02-09 05:39 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-09 07:47 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-09 09:19 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-09 09:55 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-09 12:10 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-09 13:01 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-12 09:36 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-12 10:52 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-19 21:19 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-20 09:35 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-20 09:52 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-20 11:15 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-02-20 11:45 -0800
Re: Using fread function "James R. Kuyper" <jameskuyper@verizon.net> - 2017-02-20 15:38 -0500
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-23 12:12 -0800
Re: Using fread function jameskuyper@verizon.net - 2017-02-24 10:37 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-23 05:04 -0800
Re: Using fread function supercat@casperkitty.com - 2017-02-23 07:58 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-25 11:48 -0800
Re: Using fread function jameskuyper@verizon.net - 2017-02-25 13:44 -0800
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-04-17 13:12 -0700
Re: Using fread function supercat@casperkitty.com - 2017-04-17 13:50 -0700
Re: Using fread function Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-12 09:31 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-29 13:14 -0800
Re: Using fread function Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-01-30 08:18 -0800
Re: Using fread function supercat@casperkitty.com - 2017-01-30 08:44 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-30 11:58 -0800
Re: Using fread function Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-01-30 13:05 -0800
Re: Using fread function supercat@casperkitty.com - 2017-01-30 13:39 -0800
Re: Using fread function Keith Thompson <kst-u@mib.org> - 2017-01-30 13:57 -0800
csiph-web