On 23-Feb-2001, Simon Marlow <simonmar@microsoft.com> wrote:
I agree. Would it be fixed by just #including Stg.h after any -#includes, or would that create more problems?
ghc uses gcc global register variables on x86, doesn't it? If so, they need to be declared first thing, before any function definitions; and system headers often define inline functions. So if Stg.h declares global register variables, they need to come first. You may need to split Stg.h into the part which declares the global register variables, and the remainder, and put just the first part before the user's #includes. Another (probably better) alternative is to pass the `-ffixed-<reg>' option to gcc to reserve the registers. -- Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit | of excellence is a lethal habit" WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.