Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #144672
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: "Conversions" of types |
| Date | 2019-06-09 11:44 -0700 |
| Organization | None to speak of |
| Message-ID | <lnsgsir42l.fsf@kst-u.example.com> (permalink) |
| References | <type-conversions-20190609114030@ram.dialup.fu-berlin.de> |
ram@zedat.fu-berlin.de (Stefan Ram) writes:
> |Any pointer type may be converted to an integer type.
> N2310, 6.3.2.3p6
>
> If this is true, then may I ask: Which integer type
> is the result of the conversion of the pointer type
> »double *« to an integer type?
>
> Don't they mean:
>
> Any /value of/ an expression of pointer type may be
> converted to a /value of/ an integer type.
Yes.
> ? Or does it really make sense to say that a /type/
> can be converted to another type?
No. The wording in the standard is slightly informal. The intent is
clear enough that I don't have a problem with it, though I wouldn't
mind if it were changed to refer to values.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Next in thread | Find similar | Unroll thread
Re: "Conversions" of types Keith Thompson <kst-u@mib.org> - 2019-06-09 11:44 -0700
Re: "Conversions" of types unidef <jon@unidef-systems.com> - 2019-06-10 04:16 -0500
Re: "Conversions" of types Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-06-10 03:27 -0700
Re: "Conversions" of types David Brown <david.brown@hesbynett.no> - 2019-06-10 13:24 +0200
Re: "Conversions" of types Keith Thompson <kst-u@mib.org> - 2019-06-10 14:00 -0700
csiph-web