This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: FILE Pointer
- From: Bharathi S <bharathi at lantana dot tenet dot res dot in>
- To: GNU GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 27 May 2003 21:26:27 +0530 (IST)
- Subject: Re: FILE Pointer
> At 10:12 AM 5/27/03 -0500, Eljay Love-Jensen wrote:
> > Consider a FILE structure to be opaque. Like a "typedef void
> > FILE", so a "FILE*" is a "void*". (On some platforms, that's
> > exactly what a FILE is.)
I understood the porting issue. But still I am not able to get the
complete idea behind this void. So my foolish Qs are :
The sizeof(FILE) is 148 & sizeof(void) is 1. Does it mean anything ?
and System dependent lib only can process the file descriptor ?
I try to pass a void ptr to the ftell(), then I got the compilation
error "invalid use of void expression". With out casting, How it
found that, ptr is NOT a type FILE ?
TIA,
--
Bharathi S, IndLinuX Team, (__)
DON Lab, TeNeT Group, oo )
IIT-Madras, Chennai-INDIA. (_/\
Don't scream for the Change. Become the Change.