Re: struct stat

David A. Greene (greened@eecs.umich.edu)
Thu, 11 Mar 1999 17:55:57 -0500


Ben Pfaff wrote:
>
> alan@lxorguk.ukuu.org.uk (Alan Cox) writes:
>
> I was under the impression ANSI C mandated a bytewise comparison.
>
> ANSI 6.3.9 says that the operands to == and != must be one of the
> following (paraphrasing, somewhat simplified):
> - both of arithmetic type
> - both pointers to compatible types
> - one any type of pointer and the other a pointer to void
> - one a pointer and the other a null pointer constant
> i.e., structs aren't allowed.
>
> On the other hand, I don't see the gcc documentation listing
> comparison of structs as one of its extensions.

The point is that gcc never sees structs. It sees "long long."
I guess what I'm saying here is that things should at least
be consistent. A "long long" and a struct are very different
things. As it stands now, gcc is the only compiler that truly
works under linux, and that is unfortunate.

-Dave

-
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/