Big-endian Gcc on Intel IA32
dewar@gnat.com
dewar@gnat.com
Tue Dec 18 03:49:00 GMT 2001
<<Yes, in the general case, this is of course right. But for two's
complement, octet-adressed machines, endian representation clauses for
discrete types could be implemented without major problems, I think,
at least if you restrict yourself to the little/big endian case and
ignore PDP endian.
>>
I will just give one example of a problem. What do you do with a type
which is a union, one branch of which is a four byte integer, the other
branch is two two-byte integers. Here is another problem, do you want
to allow non-contiguous fields in the case of bit field specifications.
Again, I refer people to the Norm Cohen paper on this subject. Yes, it
is possible that you can find a restricted set of cases you can deal
with at the struct level, but Florian's suggestion that the only
restriction necessary is 2-s complement (what's that got to do with
the problem???) and octet-addressed machines (what's that got to do with
the problem--it's easier to deal with this problem on word addressed machines)
is flawed.
More information about the Gcc
mailing list