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]

[mainline] PATCH to c-common.c: Don't use xxx_with_file_and_line


This removes use of xxx_with_file_and_line from c-common.c.

Bootstrapped and regtested on an i686-pc-linux-gnu.

-- Gaby

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.17648
diff -p -r1.17648 ChangeLog
*** ChangeLog	30 Apr 2003 18:24:01 -0000	1.17648
--- ChangeLog	30 Apr 2003 20:27:01 -0000
***************
*** 1,3 ****
--- 1,10 ----
+ 2003-04-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
+ 
+ 	* c-common.c (if_elt): Use location_t in lieu of "file, line" pair.
+ 	(c_expand_start_cond): Adjust.
+ 	(c_expand_end_cond): Don't use warning_with_file_and_file.
+ 	(shadow_warning): Likewise.
+ 
  2003-04-30  Nathan Sidwell  <nathan@codesourcery.com>
  
  	* tree.h (DECL_POINTER_DEPTH): Remove.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.410
diff -p -r1.410 c-common.c
*** c-common.c	14 Apr 2003 03:13:03 -0000	1.410
--- c-common.c	30 Apr 2003 20:27:02 -0000
*************** static int constant_fits_type_p		PARAMS 
*** 726,733 ****
  typedef struct
  {
    int compstmt_count;
!   int line;
!   const char *file;
    int needs_warning;
    tree if_stmt;
  } if_elt;
--- 726,732 ----
  typedef struct
  {
    int compstmt_count;
!   location_t locus;
    int needs_warning;
    tree if_stmt;
  } if_elt;
*************** c_expand_start_cond (cond, compstmt_coun
*** 919,926 ****
  
    /* Record this if statement.  */
    if_stack[if_stack_pointer].compstmt_count = compstmt_count;
!   if_stack[if_stack_pointer].file = input_filename;
!   if_stack[if_stack_pointer].line = lineno;
    if_stack[if_stack_pointer].needs_warning = 0;
    if_stack[if_stack_pointer].if_stmt = if_stmt;
    if_stack_pointer++;
--- 918,925 ----
  
    /* Record this if statement.  */
    if_stack[if_stack_pointer].compstmt_count = compstmt_count;
!   if_stack[if_stack_pointer].locus.file = input_filename;
!   if_stack[if_stack_pointer].locus.line = lineno;
    if_stack[if_stack_pointer].needs_warning = 0;
    if_stack[if_stack_pointer].if_stmt = if_stmt;
    if_stack_pointer++;
*************** c_expand_end_cond ()
*** 943,951 ****
  {
    if_stack_pointer--;
    if (if_stack[if_stack_pointer].needs_warning)
!     warning_with_file_and_line (if_stack[if_stack_pointer].file,
! 				if_stack[if_stack_pointer].line,
! 				"suggest explicit braces to avoid ambiguous `else'");
    last_expr_type = NULL_TREE;
  }
  
--- 942,949 ----
  {
    if_stack_pointer--;
    if (if_stack[if_stack_pointer].needs_warning)
!     warning ("%Hsuggest explicit braces to avoid ambiguous `else'",
!              &if_stack[if_stack_pointer].locus);
    last_expr_type = NULL_TREE;
  }
  
*************** shadow_warning (msgcode, name, decl)
*** 4787,4795 ****
    };
  
    warning (msgs[msgcode], name);
!   warning_with_file_and_line (DECL_SOURCE_FILE (decl),
! 			      DECL_SOURCE_LINE (decl),
! 			      "shadowed declaration is here");
  }
  
  /* Attribute handlers common to C front ends.  */
--- 4785,4791 ----
    };
  
    warning (msgs[msgcode], name);
!   warning ("%Hshadowed declaration is here", &DECL_SOURCE_LOCATION (decl));
  }
  
  /* Attribute handlers common to C front ends.  */


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