OSDN Git Service

* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
[pf3gnuchains/gcc-fork.git] / gcc / ch / lang.c
index 794c592..5c943fe 100644 (file)
@@ -1,5 +1,6 @@
 /* Language-specific hook definitions for CHILL front end.
-   Copyright (C) 1992, 93, 1994, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -26,6 +27,9 @@ Boston, MA 02111-1307, USA.  */
 #include "lex.h"
 #include "input.h"
 #include "toplev.h"
+#include "rtl.h"
+#include "expr.h"
+#include "diagnostic.h"
 
 /* Type node for boolean types.  */
 
@@ -47,14 +51,17 @@ int ignore_case = 1;
 int special_UC = 0;
 
 /* The actual name of the input file, regardless of any #line directives */
-char* chill_real_input_filename;
+const char* chill_real_input_filename;
 extern FILE* finput;
 
-extern int maximum_field_alignment;
+static int deep_const_expr                     PARAMS ((tree));
+static void chill_print_error_function          PARAMS ((diagnostic_context *,
+                                                         const char *));
 \f
-/* return 1 if the expression tree given has all
-   constant nodes as its leaves; return 0 otherwise. */
-int
+/* Return 1 if the expression tree given has all
+   constant nodes as its leaves,otherwise. */
+
+static int
 deep_const_expr (exp)
      tree exp;
 {
@@ -66,13 +73,13 @@ deep_const_expr (exp)
     return 0;
 
   code = TREE_CODE (exp);
-  length = tree_code_length[(int) code];
+  length = first_rtl_op (TREE_CODE (exp));
 
   /* constant leaf?  return TRUE */
   if (TREE_CODE_CLASS (code) == 'c')
     return 1;
 
-  /* recursively check next level down */
+  /* Recursively check next level down.  */
   for (i = 0; i < length; i++)
     if (! deep_const_expr (TREE_OPERAND (exp, i)))
       return 0;
@@ -143,21 +150,10 @@ lang_print_xnode (file, node, indent)
      int indent ATTRIBUTE_UNUSED;
 {
 }
-
-void
-GNU_xref_begin ()
-{
-  fatal ("GCC does not yet support XREF");
-}
-
-void
-GNU_xref_end ()
-{
-  fatal ("GCC does not yet support XREF");
-}
 \f
 /*
  * process chill-specific compiler command-line options
+ * do not complain if the option is not recognised
  */
 int
 lang_decode_option (argc, argv)
@@ -192,8 +188,8 @@ lang_decode_option (argc, argv)
       explicit_ignore_case = 1;
       if (special_UC)
        {
-         error ("Ignoring case upon input and");
-         error ("making special words uppercase wouldn't work.");
+         error ("ignoring case upon input and");
+         error ("making special words uppercase wouldn't work");
        }
       else
        ignore_case = 1;
@@ -204,8 +200,8 @@ lang_decode_option (argc, argv)
     {
       if (explicit_ignore_case)
        {
-         error ("Making special words uppercase and");
-         error (" ignoring case upon input wouldn't work.");
+         error ("making special words uppercase and");
+         error (" ignoring case upon input wouldn't work");
        }
       else
        special_UC = 1, ignore_case = 0;
@@ -234,9 +230,10 @@ lang_decode_option (argc, argv)
   return 1;
 }
 
-void
-chill_print_error_function (file)
-     char *file;
+static void
+chill_print_error_function (context, file)
+     diagnostic_context *buffer __attribute__((__unused__));
+     const char *file;
 {
   static tree last_error_function = NULL_TREE;
   static struct module *last_error_module = NULL;
@@ -262,8 +259,8 @@ chill_print_error_function (file)
     }
   else
     {
-      char *kind = "function";
-      char *name = (*decl_printable_name) (current_function_decl, 2);
+      const char *kind = "function";
+      const char *name = (*decl_printable_name) (current_function_decl, 2);
       fprintf (stderr, "In %s `%s':\n", kind, name);
     }
 }
@@ -280,11 +277,22 @@ incomplete_type_error (value, type)
   error ("internal error - use of undefined type");
 }
 
+/* Return the typed-based alias set for T, which may be an expression
+   or a type.  Return -1 if we don't do anything special.  */
+
+HOST_WIDE_INT
+lang_get_alias_set (t)
+     tree t ATTRIBUTE_UNUSED;
+{
+  /* ??? Need to figure out what the rules are.  Certainly we'd need
+     to handle union-like things, and probably variant records. 
+     Until then, turn off type-based aliasing completely.  */
+  return 0;
+}
+
 void
 lang_init ()
 {
-  extern void (*print_error_function) PROTO((char*));
-
   chill_real_input_filename = input_filename;
 
   /* the beginning of the file is a new line; check for # */