void * not handled in AIX C compiler ?

Johann Schweigl johnny at edvvie.at
Fri Oct 6 14:28:43 AEST 1989


>From article <2398 at ibmpa.UUCP>, by webb at bass.tcspa.ibm.com (Bill Webb):
> 
> If the AIX compiler claims to be ANSI (I'm not sure if it does), then
> I'd suggest that you do report it as a bug and see if you can get it fixed.

I've got a number of good explanations to this question. 
I sum up by citing Karl Heuer:

---
I believe that AIX C is not intended  to be an ANSI C compiler.  
(Which is currently right -- johnny)
AIX C supports "void" because it's been part of the language for a decade.                               
It does not support declaring variables as "void *" because this is 
a recent invention, and the compiler  has not yet been upgraded to support  
ANSI C.                               
                                      
Despite appearances, it does not support "void *" in a typecast,       
either.  The compiler accepts the construct, but it doesn't behave the  
way X3J11 says.                      
                                     
The reason that "void *" isn't even accepted in a declaration is because  
of an implementation detail of the compiler.  Since "void *" was a       
meaningless type in pre-ANSI C, the compiler used that particular         
bit-pattern internally to mean "no type", i.e. for undeclared variables. 
---

Thanks to you all, johnny
-- 
This does not reflect the   | Johann  Schweigl | DOS machines? 
opinions of my employer.    | johnny at edvvie.at | I don't hate DOS machines. 
I am busy enough by talking |                  | I just feel better when I
about my own ...            |   EDVG  Vienna   | don't see one ...



More information about the Comp.lang.c mailing list