Re: OFF-Topic glibc behavior (glibc is right)

Guest section DW (dwguest@win.tue.nl)
Wed, 21 Oct 1998 22:25:05 +0200 (MET DST)


From: "Richard B. Johnson" <root@chaos.analogic.com>

FILE here;
memcmp(&here, file, sizeof(file));
/* This will seg-fault. */
fprintf(&here, "Hello world!\n");

Yes. This is not the right forum to ask about dubious C programs.
It has nothing to do with the kernel.
But let me quote a fragment of my old draft C standard -
the numbering or text may differ these days:

4.9.3. Files ...
The address of the FILE object used to control a stream may be significant;
a copy of a FILE object may not necessarily serve in place of the original.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/