Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #379538
| From | Phil Carmody <pc+usenet@asdf.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Call to a function |
| Date | 2023-11-21 01:29 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <87h6lgovfe.fsf@fatphil.org> (permalink) |
| References | (7 earlier) <86il69zvno.fsf@linuxsc.com> <87a5rh1m5t.fsf@fatphil.org> <86wmulxbuh.fsf@linuxsc.com> <87y1exzzq6.fsf@fatphil.org> <86o7ftyd71.fsf@linuxsc.com> |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > Phil Carmody <pc+usenet@asdf.org> writes: >> There's wording in the standard to support the "object" claim, but >> I'm not seeing direct support for the "type" claim. Of course, there >> might be a chain of deductions that leads there. > > Here is my reasoning. > > The sizeof operator works on both expressions (including expressions > that designate objects) and type names. > > The result of sizeof has type size_t. > > In <stdint.h>, the preprocessor symbol SIZE_MAX gives the maximum > value (for that implementation) of a value of type size_t. SIZE_MAX > has a lower bound of 65535 (a minimum implementation limit). So any > type whose size exceeds this value is violating the restriction that > strictly conforming programs not exceed a minimum implementation > limit. (Sorry if that was belaboring the obvious.) Yup, that has no holes, AFAICS. >>>> clang retains its stance on the concept: >>>> >>>> """ >>>> phil@dovespaz:~$ clang -Wall -o crap crap.c >>>> crap.c:11:59: error: array is too large (2305843009213693952 elements) >>>> printf( " large has %21zu bytes\n", sizeof(char[2305843009213693952])); >>>> ^~~~~~~~~~~~~~~~~~~ >>>> 1 error generated. >>>> """ >>>> >>>> Is there an "array", /per se/? I only see a type. >>> >>> An array type, but no array object. I think most people would say >>> there isn't an array, but just a type. >> >> The standard uses the word "array" as a noun to refer to an array >> object, so I was using the same usage as the standard there. > > Looking through the standard, I see that the word array is used both > as an adjective and as a noun. I only looked through about a third of 1570, but I only saw noun uses. I saw noun+noun compound nouns, with the first noun being "array", but that doesn't make the word an adjective. An actual adjectival use could be: *The object is array. (as per "The bus is red.") the likes of which I couldn't find. Yes, this is more a.u.e. than c.l.c. Phil -- We are no longer hunters and nomads. No longer awed and frightened, as we have gained some understanding of the world in which we live. As such, we can cast aside childish remnants from the dawn of our civilization. -- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Call to a function Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-11-10 03:37 -0800
Re: Call to a function Kaz Kylheku <864-117-4973@kylheku.com> - 2023-11-10 22:04 +0000
Re: Call to a function Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-11-13 08:14 -0800
Re: Call to a function Phil Carmody <pc+usenet@asdf.org> - 2023-11-13 21:35 +0200
Re: Call to a function Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-11-13 12:48 -0800
Re: Call to a function Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-11-13 19:17 -0800
Re: Call to a function Phil Carmody <pc+usenet@asdf.org> - 2023-11-16 13:47 +0200
Re: Call to a function Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-11-16 06:39 -0800
Re: Call to a function Phil Carmody <pc+usenet@asdf.org> - 2023-11-21 01:29 +0200
Re: Call to a function James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-11-21 23:21 -0500
Re: Call to a function Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-12-24 11:12 -0800
csiph-web