Newsgroups: | comp.arch,comp.compilers |
From: | monnier@di.epfl.ch (Stefan Monnier) |
Keywords: | optimize, design |
Organization: | Ecole Polytechnique Federale de Lausanne |
References: | 94-10-108 94-11-087 |
Date: | Mon, 14 Nov 1994 13:35:10 GMT |
Andy Glew <glew@ichips.intel.com> wrote:
> From this, I conclude that there are valid reasons to not arbitrarily
> reorder BUT ALL OF THESE REASONS ARE BROKEN OR NONPORTABLE C PROGRAMS IN
> THE FIRST PLACE!!! (except for class a, passing between separately
> compiled modules)
And I might argue that this exception is due to C being broken:
it assumes that two structures that have the same fields will be laid
out the same way. (since when you compile two files with the same
struct definition, it's not one but two similar types that are seen
from the compiler). This is an old problem due to old linker design.
Languages with a better separate compilation support (like modula-2,
but tons of other examples could be used) don't have this problem !
Stefan
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.