Re: void vs void* (philosophical question)



Giannis Papadopoulos wrote:

According to the standard (ISO C99 draft WG14/N1124),
void is the incomplete type that cannot be completed
and comprises the empty set of values.
Since it declares the absense of a value can it be considered a
data type?

No.

sizeof(void) is undefined.
You can't declare an object of type void.
You can't have an array of type void elements.
An expression of type void can neither be
the left nor right operand of the assignment operator.

--
pete
.



Relevant Pages

  • Re: Question about C code and use of "void"
    ... And I'm confused becasue void is, of course, a keyword. ... You are confusing #define syntax with typedef syntax. ... int INT; ... declares a typename called INT that is an alias for int. ...
    (microsoft.public.vc.language)
  • Re: Need some explanation
    ... >> required to document void main. ... >> extensions such as void main, ... implementation declares no prototype for this function. ... be defined with a return type of int and with no parameters: ...
    (comp.lang.c)
  • Re: Question about C code and use of "void"
    ... declares a variable called fnptr that is a pointer to a function that ... takes an int argument and returns void, ... pointer to a function that takes an int argument and returns void. ... A typedef can also be used to define a function type. ...
    (microsoft.public.vc.language)
  • Re: global variable declaration in header
    ... void print; ... It defines (rather than merely declares) the ... and merely declare i in the header file with ...
    (comp.lang.c)
  • Re: global variable declaration in header
    ... void print; ... It defines (rather than merely declares) the ... and merely declare i in the header file with ... declaration implicitly has then "extern" anyway. ...
    (comp.lang.c)