Must sizeof(int) exceed sizeof(char) in hosted environments?

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Sep 1 14:01:40 AEST 1989


In article <1713 at cbnewsl.ATT.COM> dfp at cbnewsl.ATT.COM (david.f.prosser) writes:
>At this point, I'd be happier if there were a requirement that EOF be
>distinct from all other values possible to return from fgetc!

The very issue you discussed arose at an X3J11 meeting, in off-line
discussion with Jervis, myself, and someone else (as I recall).  My
dim recollection is that we decided EOF didn't have to be distinct
if sizeof(int)==sizeof(char), and so far as we could tell the latter
is allowed.  This agrees with your conclusions.  I would rather
construe the description of EOF as requiring that it be distinct,
for the obvious reasons.

Yet another matter for the "interpretations" phase?



More information about the Comp.std.c mailing list