ggc-common.c bootstrap breakage
diff mbox series

Message ID CAGWvny=vFJA6nc5CDSvJW4_a+YaWSWV68iAsqmq3pMoSHucvMw@mail.gmail.com
State New
Headers show
Series
  • ggc-common.c bootstrap breakage
Related show

Commit Message

David Edelsohn Nov. 4, 2019, 1:54 p.m. UTC
The change to add malloc.h to ggc-common.c broke bootstrap.  system.h
must be included before system header files.  The following patch
fixes this, committed as obvious with concurrence by Richi.

Thanks, David

* ggc-common.c: Include system.h before malloc.h.

Comments

Richard Biener Nov. 4, 2019, 2:04 p.m. UTC | #1
On Mon, Nov 4, 2019 at 2:55 PM David Edelsohn <dje.gcc@gmail.com> wrote:
>
> The change to add malloc.h to ggc-common.c broke bootstrap.  system.h
> must be included before system header files.  The following patch
> fixes this, committed as obvious with concurrence by Richi.

Broke x86.

I'm testing the attached.

Richard.

> Thanks, David
>
> * ggc-common.c: Include system.h before malloc.h.
>
> Index: ggc-common.c
> ===================================================================
> --- ggc-common.c        (revision 277777)
> +++ ggc-common.c        (working copy)
> @@ -21,10 +21,10 @@
>     any particular GC implementation.  */
>
>  #include "config.h"
> +#include "system.h"
>  #ifdef HAVE_MALLINFO
>  #include <malloc.h>
>  #endif
> -#include "system.h"
>  #include "coretypes.h"
>  #include "timevar.h"
>  #include "diagnostic-core.h"

Patch
diff mbox series

Index: ggc-common.c
===================================================================
--- ggc-common.c        (revision 277777)
+++ ggc-common.c        (working copy)
@@ -21,10 +21,10 @@ 
    any particular GC implementation.  */

 #include "config.h"
+#include "system.h"
 #ifdef HAVE_MALLINFO
 #include <malloc.h>
 #endif
-#include "system.h"
 #include "coretypes.h"
 #include "timevar.h"
 #include "diagnostic-core.h"