This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC: fclose() Error


Hi g sobers,

> Would appreciate assistance with addressing the situation.

f is a dangling pointer.

f1 just happens to point to the recently closed buffer that f used to point
to.

I would not rely on that behavior.  Not only is it non-portable, it may not
work that way reliably even on the same platform.

It's a bug in the code.  Not in GCC, nor on Cygwin.

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]