OSDN Git Service

gcc/objc/Changelog:
[pf3gnuchains/gcc-fork.git] / gcc / c-semantics.c
index b6c3a27..683655f 100644 (file)
@@ -26,24 +26,15 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "function.h"
 #include "splay-tree.h"
-#include "varray.h"
 #include "c-common.h"
-#include "except.h"
 /* In order for the format checking to accept the C frontend
    diagnostic framework extensions, you must define this token before
    including toplev.h.  */
 #define GCC_DIAG_STYLE __gcc_cdiag__
 #include "toplev.h"
 #include "flags.h"
-#include "ggc.h"
-#include "rtl.h"
 #include "output.h"
-#include "timevar.h"
-#include "predict.h"
-#include "tree-inline.h"
-#include "gimple.h"
 #include "tree-iterator.h"
-#include "langhooks.h"
 
 /* Create an empty statement tree rooted at T.  */
 
@@ -103,12 +94,12 @@ pop_stmt_list (tree t)
 
 /* Build a generic statement based on the given type of node and
    arguments. Similar to `build_nt', except that we set
-   EXPR_LOCATION to be the current source location.  */
+   EXPR_LOCATION to LOC. */
 /* ??? This should be obsolete with the lineno_stmt productions
    in the grammar.  */
 
 tree
-build_stmt (enum tree_code code, ...)
+build_stmt (location_t loc, enum tree_code code, ...)
 {
   tree ret;
   int length, i;
@@ -123,7 +114,7 @@ build_stmt (enum tree_code code, ...)
   ret = make_node (code);
   TREE_TYPE (ret) = void_type_node;
   length = TREE_CODE_LENGTH (code);
-  SET_EXPR_LOCATION (ret, input_location);
+  SET_EXPR_LOCATION (ret, loc);
 
   /* TREE_SIDE_EFFECTS will already be set for statements with
      implicit side effects.  Here we make sure it is set for other
@@ -148,7 +139,8 @@ build_stmt (enum tree_code code, ...)
 /* Create a CASE_LABEL_EXPR tree node and return it.  */
 
 tree
-build_case_label (tree low_value, tree high_value, tree label_decl)
+build_case_label (location_t loc,
+                 tree low_value, tree high_value, tree label_decl)
 {
-  return build_stmt (CASE_LABEL_EXPR, low_value, high_value, label_decl);
+  return build_stmt (loc, CASE_LABEL_EXPR, low_value, high_value, label_decl);
 }