OSDN Git Service

* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
[pf3gnuchains/gcc-fork.git] / gcc / ch / inout.c
index c9af816..6049ff4 100644 (file)
@@ -1,5 +1,6 @@
 /* Implement I/O-related actions for CHILL.
-   Copyright (C) 1992, 93, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000
+   Free Software Foundation, Inc.
    
    This file is part of GNU CC.
    
@@ -15,7 +16,8 @@
    
    You should have received a copy of the GNU General Public License
    along with GNU CC; see the file COPYING.  If not, write to
-   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
 #include "system.h"
@@ -34,7 +36,26 @@ extern int ignore_case;
 /* set non-zero if special words are to be entered in uppercase */
 extern int special_UC;
 
-static int intsize_of_charsexpr PROTO((tree));
+static int intsize_of_charsexpr                PARAMS ((tree));
+static tree add_enum_to_list           PARAMS ((tree, tree));
+static void build_chill_io_list_type   PARAMS ((void));
+static void build_io_types             PARAMS ((void));
+static void declare_predefined_file    PARAMS ((const char *, const char *));
+static tree build_access_part          PARAMS ((void));
+static tree textlocation_mode          PARAMS ((tree));
+static int check_assoc                 PARAMS ((tree, int, const char *));
+static tree assoc_call                 PARAMS ((tree, tree, const char *));
+static int check_transfer              PARAMS ((tree, int, const char *));
+static int connect_process_optionals   PARAMS ((tree, tree *, tree *, tree));
+static tree connect_text               PARAMS ((tree, tree, tree, tree));
+static tree connect_access             PARAMS ((tree, tree, tree, tree));
+static int check_access                        PARAMS ((tree, int, const char *));
+static int check_text                  PARAMS ((tree, int, const char *));
+static tree get_final_type_and_range   PARAMS ((tree, tree *, tree *));
+static void process_io_list            PARAMS ((tree, tree *, tree *, rtx *,
+                                               int, int));
+static void check_format_string                PARAMS ((tree, tree, int));
+static int get_max_size                        PARAMS ((tree));
 
 /* association mode */
 tree association_type_node;
@@ -110,8 +131,7 @@ static tree add_enum_to_list (type, context)
       if (wrk->context == context && wrk->type == type)
        {
          /* yes, found. look if the ptrdecl is valid in this scope */
-         char  *name = IDENTIFIER_POINTER (DECL_NAME (wrk->ptrdecl));
-         tree   var  = get_identifier (name);
+         tree   var  = DECL_NAME (wrk->ptrdecl);
          tree   decl = lookup_name (var);
            
          if (decl == NULL_TREE)
@@ -1046,8 +1066,8 @@ build_io_types ()
 \f
 static void
 declare_predefined_file (name, assembler_name)
-     char *name;
-     char* assembler_name;
+     const char *name;
+     const char *assembler_name;
 {
   tree decl = build_lang_decl (VAR_DECL, get_identifier (name),
                               stdio_type_node);
@@ -1068,8 +1088,7 @@ inout_init ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
 
   extern tree chill_predefined_function_type;
   tree endlink = void_list_node;
@@ -1091,88 +1110,88 @@ inout_init ()
 
   builtin_function ((ignore_case || ! special_UC) ? "associate" : "ASSOCIATE",
                    chill_predefined_function_type,
-                   BUILT_IN_ASSOCIATE, NULL_PTR);
+                   BUILT_IN_ASSOCIATE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "connect" : "CONNECT",
                    chill_predefined_function_type,
-                   BUILT_IN_CONNECT, NULL_PTR);
+                   BUILT_IN_CONNECT, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "create" : "CREATE",
                    chill_predefined_function_type,
-                   BUILT_IN_CREATE, NULL_PTR);
+                   BUILT_IN_CREATE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "delete" : "DELETE",
                    chill_predefined_function_type,
-                   BUILT_IN_CH_DELETE, NULL_PTR);
+                   BUILT_IN_CH_DELETE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "disconnect" : "DISCONNECT",
                    chill_predefined_function_type,
-                   BUILT_IN_DISCONNECT, NULL_PTR);
+                   BUILT_IN_DISCONNECT, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "dissociate" : "DISSOCIATE",
                    chill_predefined_function_type,
-                   BUILT_IN_DISSOCIATE, NULL_PTR);
+                   BUILT_IN_DISSOCIATE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "eoln" : "EOLN",
                    chill_predefined_function_type,
-                   BUILT_IN_EOLN, NULL_PTR);
+                   BUILT_IN_EOLN, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "existing" : "EXISTING",
                    chill_predefined_function_type,
-                   BUILT_IN_EXISTING, NULL_PTR);
+                   BUILT_IN_EXISTING, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "getassociation" : "GETASSOCIATION",
                    chill_predefined_function_type,
-                   BUILT_IN_GETASSOCIATION, NULL_PTR);
+                   BUILT_IN_GETASSOCIATION, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "gettextaccess" : "GETTEXTASSCESS",
                    chill_predefined_function_type,
-                   BUILT_IN_GETTEXTACCESS, NULL_PTR);
+                   BUILT_IN_GETTEXTACCESS, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "gettextindex" : "GETTEXTINDEX",
                    chill_predefined_function_type,
-                   BUILT_IN_GETTEXTINDEX, NULL_PTR);
+                   BUILT_IN_GETTEXTINDEX, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "gettextrecord" : "GETTEXTRECORD",
                    chill_predefined_function_type,
-                   BUILT_IN_GETTEXTRECORD, NULL_PTR);
+                   BUILT_IN_GETTEXTRECORD, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "getusage" : "GETUSAGE",
                    chill_predefined_function_type,
-                   BUILT_IN_GETUSAGE, NULL_PTR);
+                   BUILT_IN_GETUSAGE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "indexable" : "INDEXABLE",
                    chill_predefined_function_type,
-                   BUILT_IN_INDEXABLE, NULL_PTR);
+                   BUILT_IN_INDEXABLE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "isassociated" : "ISASSOCIATED",
                    chill_predefined_function_type,
-                   BUILT_IN_ISASSOCIATED, NULL_PTR);
+                   BUILT_IN_ISASSOCIATED, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "modify" : "MODIFY",
                    chill_predefined_function_type,
-                   BUILT_IN_MODIFY, NULL_PTR);
+                   BUILT_IN_MODIFY, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "outoffile" : "OUTOFFILE",
                    chill_predefined_function_type,
-                   BUILT_IN_OUTOFFILE, NULL_PTR);
+                   BUILT_IN_OUTOFFILE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "readable" : "READABLE",
                    chill_predefined_function_type,
-                   BUILT_IN_READABLE, NULL_PTR);
+                   BUILT_IN_READABLE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "readrecord" : "READRECORD",
                    chill_predefined_function_type,
-                   BUILT_IN_READRECORD, NULL_PTR);
+                   BUILT_IN_READRECORD, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "readtext" : "READTEXT",
                    chill_predefined_function_type,
-                   BUILT_IN_READTEXT, NULL_PTR);
+                   BUILT_IN_READTEXT, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "sequencible" : "SEQUENCIBLE",
                    chill_predefined_function_type,
-                   BUILT_IN_SEQUENCIBLE, NULL_PTR);
+                   BUILT_IN_SEQUENCIBLE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "settextaccess" : "SETTEXTACCESS",
                    chill_predefined_function_type,
-                   BUILT_IN_SETTEXTACCESS, NULL_PTR);
+                   BUILT_IN_SETTEXTACCESS, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "settextindex" : "SETTEXTINDEX",
                    chill_predefined_function_type,
-                   BUILT_IN_SETTEXTINDEX, NULL_PTR);
+                   BUILT_IN_SETTEXTINDEX, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "settextrecord" : "SETTEXTRECORD",
                    chill_predefined_function_type,
-                   BUILT_IN_SETTEXTRECORD, NULL_PTR);
+                   BUILT_IN_SETTEXTRECORD, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "variable" : "VARIABLE",
                    chill_predefined_function_type,
-                   BUILT_IN_VARIABLE, NULL_PTR);
+                   BUILT_IN_VARIABLE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "writeable" : "WRITEABLE",
                    chill_predefined_function_type,
-                   BUILT_IN_WRITEABLE, NULL_PTR);
+                   BUILT_IN_WRITEABLE, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "writerecord" : "WRITERECORD",
                    chill_predefined_function_type,
-                   BUILT_IN_WRITERECORD, NULL_PTR);
+                   BUILT_IN_WRITERECORD, BUILT_IN_NORMAL, NULL_PTR);
   builtin_function ((ignore_case || ! special_UC) ? "writetext" : "WRITETEXT",
                    chill_predefined_function_type,
-                   BUILT_IN_WRITETEXT, NULL_PTR);
+                   BUILT_IN_WRITETEXT, BUILT_IN_NORMAL, NULL_PTR);
 
   /* build function prototypes */
   bool_ftype_ptr_ptr_int = 
@@ -1280,65 +1299,65 @@ inout_init ()
                       endlink)))))))));
 
   builtin_function ("__associate", ptr_ftype_ptr_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__connect", void_ftype_ptr_ptr_int_int_int_long_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__create", void_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__delete", void_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__disconnect", void_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__dissociate", void_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__eoln", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__existing", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__getassociation", ptr_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__gettextaccess", ptr_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__gettextindex", luns_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__gettextrecord", ptr_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__getusage", int_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__indexable", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__isassociated", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__modify", void_ftype_ptr_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__outoffile", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__readable", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__readrecord", ptr_ftype_ptr_int_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__readtext_f", void_ftype_ptr_int_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__readtext_s", void_ftype_ptr_int_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__sequencible", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__settextaccess", void_ftype_ptr_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__settextindex", void_ftype_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__settextrecord", void_ftype_ptr_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__variable", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__writeable", bool_ftype_ptr_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__writerecord", void_ftype_ptr_int_ptr_luns_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__writetext_f", void_ftype_ptr_int_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
   builtin_function ("__writetext_s", void_ftype_ptr_int_ptr_int_ptr_int_ptr_int,
-                   NOT_BUILT_IN, NULL_PTR);
+                   0, NOT_BUILT_IN, NULL_PTR);
 
   /* declare ASSOCIATION, ACCESS, and TEXT modes */
   build_io_types ();
@@ -1447,7 +1466,7 @@ access_dynamic (access)
   return integer_zero_node;
 }
 
-#if 0
+/*
    returns a structure like
    STRUCT (data STRUCT (flags ULONG,
                         reclength ULONG,
@@ -1461,7 +1480,7 @@ access_dynamic (access)
    TYPE_DECL __recordmode recordmode ? recordmode : void_type_node
    TYPE_DECL __indexmode  indexmode  ? indexmode  : void_type_node
    CONST_DECL __dynamic   dynamic ? integer_one_node : integer_zero_node
-#endif
+*/
 
 static tree
 build_access_part ()
@@ -1528,7 +1547,7 @@ build_access_mode (indexmode, recordmode, dynamic)
   return type;
 }
 \f
-#if 0
+/*
   returns a structure like:
   STRUCT (txt STRUCT (flags ULONG,
                       text_record PTR,
@@ -1548,7 +1567,7 @@ build_access_mode (indexmode, recordmode, dynamic)
   TYPE_DECL __indexmode indexmode ? indexmode : void_type_node
   CONST_DECL __text_length
   CONST_DECL __dynamic  dynamic ? integer_one_node : integer_zero_node
-#endif
+*/
 tree
 build_text_mode (textlength, indexmode, dynamic)
      tree textlength;
@@ -1633,7 +1652,7 @@ check_text_length (length)
     }
   if (compare_int_csts (LE_EXPR, length, integer_zero_node))
     {
-      error ("text length must be greater then 0");
+      error ("text length must be greater than 0");
       return integer_one_node;
     }
   return length;
@@ -1726,7 +1745,7 @@ static int
 check_assoc (assoc, argnum, errmsg)
      tree assoc;
      int argnum;
-     char *errmsg;
+     const char *errmsg;
 {
   if (assoc == NULL_TREE || TREE_CODE (assoc) == ERROR_MARK)
     return 0;
@@ -1859,7 +1878,7 @@ static tree
 assoc_call (assoc, func, name)
      tree assoc;
      tree func;
-     char *name;
+     const char *name;
 {
   tree arg1, arg2, arg3;
   tree result;
@@ -2009,7 +2028,7 @@ build_chill_modify (assoc, list)
       attr = TREE_VALUE (TREE_CHAIN (list));
       break;
     default:
-      error ("Too many arguments in call to MODIFY");
+      error ("too many arguments in call to MODIFY");
       had_errors = 1;
       break;
     }
@@ -2106,7 +2125,7 @@ static int
 check_transfer (transfer, argnum, errmsg)
      tree transfer;
      int argnum;
-     char *errmsg;
+     const char *errmsg;
 {
   int result = 0;
 
@@ -2221,7 +2240,6 @@ void init_text_location (decl, type)
      tree type;
 {
   tree indexmode = text_indexmode (type);
-  tree textlength = text_length (type);
   unsigned long accessflags = 0;
   unsigned long textflags = IO_TEXTLOCATION;
   tree lowindex = integer_zero_node;
@@ -2483,7 +2501,7 @@ static int
 check_access (access, argnum, errmsg)
      tree access;
      int argnum;
-     char *errmsg;
+     const char *errmsg;
 {
   if (access == NULL_TREE || TREE_CODE (access) == ERROR_MARK)
     return 1;
@@ -2524,7 +2542,7 @@ build_chill_readrecord (access, optionals)
       /* we must have an index */
       if (!len)
        {
-         error ("Too few arguments in call to `readrecord'");
+         error ("too few arguments in call to `readrecord'");
          return error_mark_node;
        }
       index = TREE_VALUE (optionals);
@@ -2595,7 +2613,7 @@ build_chill_writerecord (access, optionals)
   len = list_length (optionals);
   if (indexmode != void_type_node && len != 2)
     {
-      error ("Too few arguments in call to `writerecord'");
+      error ("too few arguments in call to `writerecord'");
       return error_mark_node;
     }
   if (indexmode != void_type_node)
@@ -2719,7 +2737,7 @@ static int
 check_text (text, argnum, errmsg)
      tree text;
      int argnum;
-     char *errmsg;
+     const char *errmsg;
 {
   if (text == NULL_TREE || TREE_CODE (text) == ERROR_MARK)
     return 0;
@@ -2802,8 +2820,7 @@ build_chill_gettextaccess (text)
   tree access, refaccess, acc, decl, listbase;
   tree tlocmode, indexmode, dynamic;
   tree result;
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment = maximum_field_alignment;
+  unsigned int save_maximum_field_alignment = maximum_field_alignment;
 
   if (! check_text (text, 1, "GETTEXTACCESS"))
     return error_mark_node;
@@ -3023,8 +3040,8 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
     {
       tree item = TREE_VALUE (exprlist);
       tree idx = build_int_2 (idxcnt++, 0);
-      char *fieldname = 0;
-      char *enumname = 0;
+      const char *fieldname = 0;
+      const char *enumname = 0;
       tree array_ref = build_chill_array_ref_1 (iolist, idx);
       tree item_type;
       tree range_low = NULL_TREE, range_high = NULL_TREE;
@@ -3121,7 +3138,7 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
                        enumname = "__IO_LongRangeLoc";
                      break;
                    default:
-                     error ("Cannot process %d bits integer for READTEXT argument %d.",
+                     error ("cannot process %d bits integer for READTEXT argument %d",
                             type_size, idxcnt + 1 + argoffset);
                      continue;
                    }
@@ -3167,7 +3184,7 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
                        enumname = "__IO_LongLoc";
                      break;
                    default:
-                     error ("Cannot process %d bits integer for READTEXT argument %d.",
+                     error ("cannot process %d bits integer for READTEXT argument %d",
                             type_size, idxcnt + 1 + argoffset);
                      continue;
                    }
@@ -3242,7 +3259,7 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
                          goto try_long;
                        }
                    }
-                 error ("Cannot process %d bits integer WRITETEXT argument %d.",
+                 error ("cannot process %d bits integer WRITETEXT argument %d",
                         type_size, idxcnt + 1 + argoffset);
                  continue;
                }
@@ -3314,7 +3331,7 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
        }
       else if (TREE_CODE (item_type) == BOOLEAN_TYPE)
        {
-         tree to_assign;
+         tree to_assign = NULL_TREE;
 
          if (do_read && readonly)
            {
@@ -3705,7 +3722,7 @@ process_io_list (exprlist, iolist_addr, iolist_length, iolist_rtx, do_read,
       else
        {
          /* datatype is not yet implemented, issue a warning */
-         error ("cannot process mode of argument %d for %sTEXT.", idxcnt + 1 + argoffset,
+         error ("cannot process mode of argument %d for %sTEXT", idxcnt + 1 + argoffset,
                 do_read ? "READ" : "WRITE");
          enumname = "__IO_UNUSED";
        }
@@ -3788,6 +3805,9 @@ typedef enum
 } convcode_t;
 static convcode_t     convcode;
 
+static tree check_exprlist             PARAMS ((convcode_t, tree, int,
+                                               unsigned long));
+
 typedef enum
 {
   False, True,
@@ -3822,6 +3842,9 @@ typedef enum {
   NormalEnd, EndAtParen, TextFailEnd 
 } formatexit_t;
 
+static formatexit_t scanformcont       PARAMS ((char *, int, char **, int *,
+                                               tree, tree *, int, int *));
+
 /* NOTE: varibale have to be set to False before calling check_format_string */
 static Boolean empty_printed;
 
@@ -3834,7 +3857,7 @@ check_exprlist (code, exprlist, argnum, repetition)
      int argnum;
      unsigned long repetition;
 {
-  tree expr, type, result;
+  tree expr, type, result = NULL_TREE;
 
   while (repetition--)
     {
@@ -4335,7 +4358,7 @@ build_chill_writetext (text_arg, exprlist)
            }
          if (exprlist == NULL_TREE)
            {
-             error ("Too few arguments in call to `writetext'");
+             error ("too few arguments in call to `writetext'");
              return error_mark_node;
            }
          format_str = TREE_VALUE (exprlist);
@@ -4483,7 +4506,7 @@ build_chill_readtext (text_arg, exprlist)
            }
          if (exprlist == NULL_TREE)
            {
-             error ("Too few arguments in call to `readtext'");
+             error ("too few arguments in call to `readtext'");
              return error_mark_node;
            }
          format_str = TREE_VALUE (exprlist);
@@ -4554,7 +4577,7 @@ build_chill_readtext (text_arg, exprlist)
   return build1 (CONVERT_EXPR, void_type_node, integer_zero_node);
 }
 
-/* this function build all neccesary enum-tables used for
+/* this function build all necessary enum-tables used for
    WRITETEXT or READTEXT of an enum */
 
 void build_enum_tables ()
@@ -4565,8 +4588,7 @@ void build_enum_tables ()
   /* We temporarily reset the maximum_field_alignment to zero so the
      compiler's init data structures can be compatible with the
      run-time system, even when we're compiling with -fpack. */
-  extern int maximum_field_alignment;
-  int save_maximum_field_alignment;
+  unsigned int save_maximum_field_alignment;
     
   if (pass == 1)
     return;