Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #394198
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.arch, comp.lang.c |
| Subject | Re: VAX |
| Date | 2025-08-18 21:57 -0700 |
| Organization | None to speak of |
| Message-ID | <87tt236h7s.fsf@example.invalid> (permalink) |
| References | (15 earlier) <20250804220315.00007240@yahoo.com> <20250805140647.927@kylheku.com> <107t6ds$2gluc$1@dont-email.me> <874iu56wd7.fsf@example.invalid> <107uoi3$2u253$1@dont-email.me> |
Cross-posted to 2 groups.
David Brown <david.brown@hesbynett.no> writes:
> On 18.08.2025 07:18, Keith Thompson wrote:
>> Jakob Bohm <egenagwemdimtapsar@jbohm.dk> writes:
>> [...]
>>> I am unsure how GCC --pedantic deals with the standards-contrary
>>> features in the GNUC89 language, such as the different type of (foo,
>>> 'C') (GNUC says char, C89 says int), maybe specifying standard C
>>> instead of GNUC reverts those to the standard definition .
>> I'm not sure what you're referring to. You didn't say what foo is.
>> I believe that in all versions of C, the result of a comma operator
>> has
>> the type and value of its right operand, and the type of an unprefixed
>> character constant is int.
>> Can you show a complete example where `sizeof (foo, 'C')` yields
>> sizeof (int) in any version of GNUC?
>
> Presumably that's a typo - you meant to ask when the size is /not/ the
> size of "int" ? After all, you said yourself that "(foo, 'C')"
> evaluates to 'C' which is of type "int". It would be very interesting
> if Jakob can show an example where gcc treats the expression as any
> other type than "int".
Yes (more of a thinko, actually).
I meant to ask about `sizeof (foo, 'C')` yielding a value *other than*
`sizeof (int)`. Jakob implies a difference in this area between GNU C
and ISO C. I'm not aware of any.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 18:28 +0300
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-04 09:53 -0700
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 22:03 +0300
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-04 15:25 -0400
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 22:40 +0300
Re: VAX "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-04 12:44 -0700
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-04 22:21 -0700
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:25 +0000
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-05 19:14 -0700
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-06 04:31 +0000
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-06 11:48 +0300
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-06 11:56 -0400
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-12-15 11:51 -0800
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:13 +0000
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-06 11:54 -0400
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-06 13:58 -0700
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-06 21:33 -0800
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:08 +0000
Re: VAX Jakob Bohm <egenagwemdimtapsar@jbohm.dk> - 2025-08-17 20:18 +0200
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-17 22:18 -0700
Re: VAX Richard Heathfield <rjh@cpax.org.uk> - 2025-08-18 08:02 +0100
Re: VAX David Brown <david.brown@hesbynett.no> - 2025-08-18 11:34 +0200
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-18 21:57 -0700
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-06 21:14 -0800
csiph-web