This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] Fixes bootstrap with Ada


Hi,

I got the following error:

----
gcc -c   -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes     -fno-common   -DHAVE_CONFIG_H    -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/config -I../../gcc/gcc/../include -I../../gcc/gcc/../libbanshee/libcompat -I../../gcc/gcc/../libbanshee -I../../gcc/gcc/../libbanshee/points-to ../../gcc/gcc/ada/utils.c -o ada/utils.o
../../gcc/gcc/ada/utils.c: In function `create_label_decl':
../../gcc/gcc/ada/utils.c:1666: `lineno' undeclared (first use in this function)
../../gcc/gcc/ada/utils.c:1666: (Each undeclared identifier is reported only once
../../gcc/gcc/ada/utils.c:1666: for each function it appears in.)
----

The changelog states that lineno was renamed input_line:

2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>

	* trans.c (tree_transform, build_unit_elab,
	set_lineno): Rename lineno to input_line.
	* utils.c (pushdecl, create_label_decl, begin_subprog_body,
	end_subprog_body): Likewise.
	* utils2.c (build_call_raise): Likewise.

However some places use the new name and others don't.  Seems like a merge problem.  
The following patch fixes this problem.  
I found this problem when bootstrapping a patch for the gimplifier, and thus
I'm bootstrapping this patch together with the one on the gimplifier.


Index: gcc/ada/trans.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.19.2.6
diff -d -u -p -r1.19.2.6 trans.c
--- gcc/ada/trans.c	7 May 2003 13:31:13 -0000	1.19.2.6
+++ gcc/ada/trans.c	11 May 2003 10:19:54 -0000
@@ -2619,7 +2619,7 @@ tree_transform (gnat_node)
 	   the body so that the line number notes are written 
 	   correctly.  */
 	set_lineno (gnat_node, 0);
-	annotate_with_file_line (gnu_subprog_decl, input_filename, lineno);
+	annotate_with_file_line (gnu_subprog_decl, input_filename, input_line);
 
 	begin_subprog_body (gnu_subprog_decl);
 	set_lineno (gnat_node, 1);
@@ -5342,7 +5342,7 @@ build_unit_elab (gnat_unit, body_p, gnu_
 	tree lhs = TREE_PURPOSE (gnu_elab_list);
 
 	input_filename = TREE_FILENAME (lhs);
-	lineno = TREE_LINENO (lhs);
+ 	input_line = TREE_LINENO (lhs);
 
 	/* If LHS has a padded type, convert it to the unpadded type
 	   so the assignment is done properly.  */
Index: gcc/ada/utils.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.19.2.6
diff -d -u -p -r1.19.2.6 utils.c
--- gcc/ada/utils.c	7 May 2003 13:31:15 -0000	1.19.2.6
+++ gcc/ada/utils.c	11 May 2003 10:20:02 -0000
@@ -1663,7 +1663,7 @@ create_label_decl (label_name)
 
   DECL_CONTEXT (label_decl)     = current_function_decl;
   DECL_MODE (label_decl)        = VOIDmode;
-  annotate_with_file_line (label_decl, input_filename, lineno);
+  annotate_with_file_line (label_decl, input_filename, input_line);
 
   return label_decl;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]