Patch to fix format-va-1.c test failures

Joseph S. Myers jsm28@cam.ac.uk
Fri Nov 3 09:31:00 GMT 2000


This patch fixes the test failures for gcc.dg/format-va-1.c on systems
(such as i686-pc-linux-gnu) which use the default definition of
__builtin_va_list.  This fixes a regression relative to 2.95.2 on
those systems.  Using a copy of ptr_type_node stops the name
__builtin_va_list getting attached to the void * type itself and
subsequently used in nonsensical error messages.

Bootstrapped with no regressions on i686-pc-linux-gnu.  OK to commit?

2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>

	* tree.c (build_common_tree_nodes_2): Make va_list_type_node be a
	copy of ptr_type_node rather than ptr_type_node itself.

--- tree.c.orig	Thu Oct 26 12:13:39 2000
+++ tree.c	Fri Nov  3 14:29:29 2000
@@ -4946,7 +4946,7 @@ build_common_tree_nodes_2 (short_double)
 #ifdef BUILD_VA_LIST_TYPE
   BUILD_VA_LIST_TYPE (va_list_type_node);
 #else
-  va_list_type_node = ptr_type_node;
+  va_list_type_node = copy_node (ptr_type_node);
 #endif

   V4SF_type_node = make_node (VECTOR_TYPE);

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-patches mailing list