Re: void vs void* (philosophical question)
- From: Kenneth Brody <kenbrody@xxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 14:35:45 -0400
Chris Torek wrote:
[...]
(If I were in charge of things, I would probably make "void" an[...]
ordinary object type whose size is zero, so that sizeof(void) ==
0; its value, upon conversion to any other scalar type, would be
zero. Thus:
How would you handle functions which don't return anything?
void foo()
{
void retval;
... do stuff ...
return retval;
}
And how would you resolve the use of an uninitialized variable for
the return?
Would you allow comparing voids, and void arithmetic?
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap@xxxxxxxxx>
.
- Follow-Ups:
- Re: void vs void* (philosophical question)
- From: Chris Torek
- Re: void vs void* (philosophical question)
- References:
- void vs void* (philosophical question)
- From: Giannis Papadopoulos
- Re: void vs void* (philosophical question)
- From: Chris Torek
- void vs void* (philosophical question)
- Prev by Date: Re: String Character Conversion
- Next by Date: Re: OT: Windows console programs (was Re: Function Pointers)
- Previous by thread: Re: void vs void* (philosophical question)
- Next by thread: Re: void vs void* (philosophical question)
- Index(es):
Relevant Pages
|