From: Trevor Saunders Date: Sat, 4 Oct 2014 13:29:26 +0000 (+0000) Subject: Fix dupplicate declaration of ggc_realloc in gencondmd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf55b4a0ef1bc41c43e9916ed6ac261b142b5cf8;p=gcc.git 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. From-SVN: r215888 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9437414fb9b..fc200237a4f 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 83907978ee1..048a9923802 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\