From 54731e73602b04b60654c734d53cd5e8d2681aa4 Mon Sep 17 00:00:00 2001 From: tbsaunde Date: Sat, 4 Oct 2014 13:29:26 +0000 Subject: [PATCH] Fix dupplicate declaration of ggc_realloc in gencondmd If vec.h is included before ggc.h it forward declares ggc_realloc with defaulted arguments. This means ggc.h can not be included later because it would lead to a second declaration of ggc_realloc with defaulted arguments. In generator programs vec.h can not include ggc.h because it may not exist yet. So generator programs must make sure they include ggc.h before anything that includes vec.h. gcc/ChangeLog: 2014-10-04 Trevor Saunders PR pch/63429 * genconditions.c: Directly include ggc.h before rtl.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215888 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/genconditions.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9437414fb9b6..fc200237a4f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-10-04 Trevor Saunders + + PR pch/63429 + * genconditions.c: Directly include ggc.h before rtl.h. + 2014-10-03 Jan Hubicka * ipa-polymorphic-call.c diff --git a/gcc/genconditions.c b/gcc/genconditions.c index 83907978ee1f..048a99238023 100644 --- a/gcc/genconditions.c +++ b/gcc/genconditions.c @@ -70,6 +70,7 @@ write_header (void) #include \"coretypes.h\"\n\ #include \"tm.h\"\n\ #include \"insn-constants.h\"\n\ +#include \"ggc.h\"\n\ #include \"rtl.h\"\n\ #include \"tm_p.h\"\n\ #include \"function.h\"\n\ -- 2.47.3