[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Stack problems with GCC 4
josephus <dogbird@earthlink.net> writes:
> I have a question. I have gcc 3.3 on linux and if I declare a file
> pointer then initialize it
>
> (FILE *) ptr = (FILE *) malloc(....
>
> i get lvalue assignments are deprecated.
I doubt that this is the message you get. Assigning to an lvalue is
surely not deprecated. But a cast expression is not an lvalue.
Moreover, a FILE is an opaque structure that cannot be allocated with
malloc, only the C library is able to do that. Whatever you are trying
to do here, it will not work.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."