]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix dupplicate declaration of ggc_realloc in gencondmd
authortbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Oct 2014 13:29:26 +0000 (13:29 +0000)
committertbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Oct 2014 13:29:26 +0000 (13:29 +0000)
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  <tsaunders@mozilla.com>

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
gcc/genconditions.c

index 9437414fb9b67bcedbff31e0d8a472d514a9c040..fc200237a4f7cdf169bf6b8bb194bebc1c7e9e7b 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-04  Trevor Saunders  <tsaunders@mozilla.com>
+    
+       PR pch/63429
+       * genconditions.c: Directly include ggc.h before rtl.h.
+
 2014-10-03  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-polymorphic-call.c
index 83907978ee1fc353caafb98274514c1a44979264..048a9923802396d8ed6eabe1eeb3c16920c4773b 100644 (file)
@@ -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\