This is the mail archive of the gcc@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]

Re: Ada bootstrap broken with lineno changes


Andreas Jaeger wrote:
With curretn mainline CVS I get:

gcc -c   -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes     -fno-common   -DHAVE_CONFIG_H    -I. -Iada -I/cvs/gcc/gcc -I/cvs/gcc/gcc/ada -I/cvs/gcc/gcc/config -I/cvs/gcc/gcc/../include /cvs/gcc/gcc/ada/trans.c -o ada/trans.o
/cvs/gcc/gcc/ada/trans.c: In function `tree_transform':
/cvs/gcc/gcc/ada/trans.c:2623: error: `lineno' undeclared (first use in this function)
/cvs/gcc/gcc/ada/trans.c:2623: error: (Each undeclared identifier is reported only once
/cvs/gcc/gcc/ada/trans.c:2623: error: for each function it appears in.)
/cvs/gcc/gcc/ada/trans.c: In function `build_unit_elab':
/cvs/gcc/gcc/ada/trans.c:5354: error: `lineno' undeclared (first use in this function)

Nathan, can you fix this, please?
done. Looks like I failed to commit the trans changes.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

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

	* trans.c (tree_transform, build_unit_elab,
	set_lineno): Rename lineno to input_line.

Index: ada/trans.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.26
diff -c -3 -p -r1.26 trans.c
*** ada/trans.c	1 May 2003 16:13:31 -0000	1.26
--- ada/trans.c	1 May 2003 18:42:33 -0000
*************** tree_transform (gnat_node)
*** 2620,2626 ****
  	   correctly.  */
  	set_lineno (gnat_node, 0);
  	DECL_SOURCE_FILE (gnu_subprog_decl) = input_filename;
! 	DECL_SOURCE_LINE (gnu_subprog_decl) = lineno;
  
  	begin_subprog_body (gnu_subprog_decl);
  	set_lineno (gnat_node, 1);
--- 2620,2626 ----
  	   correctly.  */
  	set_lineno (gnat_node, 0);
  	DECL_SOURCE_FILE (gnu_subprog_decl) = input_filename;
! 	DECL_SOURCE_LINE (gnu_subprog_decl) = input_line;
  
  	begin_subprog_body (gnu_subprog_decl);
  	set_lineno (gnat_node, 1);
*************** tree_transform (gnat_node)
*** 3782,3788 ****
  	  gnu_orig_out_list = nreverse (gnu_orig_out_list);
  	  expand_asm_operands (gnu_template, gnu_output_list, gnu_input_list,
  			       gnu_clobber_list, Is_Asm_Volatile (gnat_node),
! 			       input_filename, lineno);
  
  	  /* Copy all the intermediate outputs into the specified outputs.  */
  	  for (; gnu_output_list;
--- 3782,3788 ----
  	  gnu_orig_out_list = nreverse (gnu_orig_out_list);
  	  expand_asm_operands (gnu_template, gnu_output_list, gnu_input_list,
  			       gnu_clobber_list, Is_Asm_Volatile (gnat_node),
! 			       input_filename, input_line);
  
  	  /* Copy all the intermediate outputs into the specified outputs.  */
  	  for (; gnu_output_list;
*************** build_unit_elab (gnat_unit, body_p, gnu_
*** 5351,5357 ****
  	    && TYPE_IS_PADDING_P (TREE_TYPE (lhs)))
  	  lhs = convert (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (lhs))), lhs);
  
! 	emit_line_note (input_filename, lineno);
  	expand_expr_stmt (build_binary_op (MODIFY_EXPR, NULL_TREE,
  					   TREE_PURPOSE (gnu_elab_list),
  					   TREE_VALUE (gnu_elab_list)));
--- 5351,5357 ----
  	    && TYPE_IS_PADDING_P (TREE_TYPE (lhs)))
  	  lhs = convert (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (lhs))), lhs);
  
! 	emit_line_note (input_filename, input_line);
  	expand_expr_stmt (build_binary_op (MODIFY_EXPR, NULL_TREE,
  					   TREE_PURPOSE (gnu_elab_list),
  					   TREE_VALUE (gnu_elab_list)));
*************** build_unit_elab (gnat_unit, body_p, gnu_
*** 5380,5388 ****
  
  extern char *__gnat_to_canonical_file_spec PARAMS ((char *));
  
! /* Determine the input_filename and the lineno from the source location
     (Sloc) of GNAT_NODE node.  Set the global variable input_filename and
!    lineno.  If WRITE_NOTE_P is true, emit a line number note.  */
  
  void
  set_lineno (gnat_node, write_note_p)
--- 5380,5388 ----
  
  extern char *__gnat_to_canonical_file_spec PARAMS ((char *));
  
! /* Determine the input_filename and the input_line from the source location
     (Sloc) of GNAT_NODE node.  Set the global variable input_filename and
!    input_line.  If WRITE_NOTE_P is true, emit a line number note.  */
  
  void
  set_lineno (gnat_node, write_note_p)
*************** set_lineno (gnat_node, write_note_p)
*** 5417,5423 ****
    input_line = Get_Logical_Line_Number (source_location);
  
    if (write_note_p)
!     emit_line_note (input_filename, lineno);
  }
  
  /* Post an error message.  MSG is the error message, properly annotated.
--- 5417,5423 ----
    input_line = Get_Logical_Line_Number (source_location);
  
    if (write_note_p)
!     emit_line_note (input_filename, input_line);
  }
  
  /* Post an error message.  MSG is the error message, properly annotated.

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