Skip to content
  • sven.panne@aedion.de's avatar
    [project @ 2002-07-21 11:46:34 by panne] · 026fa45f
    sven.panne@aedion.de authored
    Long explanation for small commit:
    
    With the recent reorganization of #includes, things get a little bit
    fragile: When gcc with -O is used, glibc's <stdio.h> defines a few
    inline functions (see <bits/stdio.h>), and "Stg.h" defines some global
    variables which reside in registers. But the latter must happen
    *before* any function definition has been seen, otherwise the
    generated code could be invalid. Consequently gcc complains like:
    
       In file included from Stg.h:182,
                        from mkNativeHdr.c:12:
       Regs.h:293: global register variable follows a function definition
       Regs.h:302: global register variable follows a function definition
    
    The solution is quite simple: Always #include "Stg.h" *before* any
    system headers.
    026fa45f