Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #103562
| Path | csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: Using fread function |
| Date | Thu, 09 Feb 2017 12:10:46 -0800 |
| Organization | None to speak of |
| Lines | 48 |
| Message-ID | <lnk28zxgzd.fsf@kst-u.example.com> (permalink) |
| References | <02c75a0c-84d7-4669-8bde-472730c7f8d3@googlegroups.com> <79af9f0c-d7e1-ef68-d186-f1ce0baa9e6c@verizon.net> <kfnefzhd13n.fsf@x-alumni2.alumni.caltech.edu> <05a6afe0-d7db-4877-a244-1c5c7bc8e928@googlegroups.com> <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> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | mx02.eternal-september.org; posting-host="ecbc845b6da81c9d4b7b978122232250"; logging-data="25086"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/C0qGqa06hRZ9r2Jf8Ln0I" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:LJjUZExt0xQOsY0SMLHYya3Wgpc= sha1:ZkUSAXpyKdOhcBmA9EBQgwVuPf4= |
| Xref | csiph.com comp.lang.c:103562 |
Show key headers only | View raw
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