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]

[committed] Convert cp/lex.c to ISO C


Bootstrapped i686-pc-linux-gnu.

Index: lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.305
diff -u -r1.305 lex.c
--- lex.c	7 Jun 2003 11:10:44 -0000	1.305
+++ lex.c	13 Jun 2003 15:40:06 -0000
@@ -40,19 +40,19 @@
 #include "timevar.h"
 #include "diagnostic.h"
 
-static int interface_strcmp PARAMS ((const char *));
-static void init_cp_pragma PARAMS ((void));
+static int interface_strcmp (const char *);
+static void init_cp_pragma (void);
 
-static tree parse_strconst_pragma PARAMS ((const char *, int));
-static void handle_pragma_vtable PARAMS ((cpp_reader *));
-static void handle_pragma_unit PARAMS ((cpp_reader *));
-static void handle_pragma_interface PARAMS ((cpp_reader *));
-static void handle_pragma_implementation PARAMS ((cpp_reader *));
-static void handle_pragma_java_exceptions PARAMS ((cpp_reader *));
-
-static int is_global PARAMS ((tree));
-static void init_operators PARAMS ((void));
-static void copy_lang_type PARAMS ((tree));
+static tree parse_strconst_pragma (const char *, int);
+static void handle_pragma_vtable (cpp_reader *);
+static void handle_pragma_unit (cpp_reader *);
+static void handle_pragma_interface (cpp_reader *);
+static void handle_pragma_implementation (cpp_reader *);
+static void handle_pragma_java_exceptions (cpp_reader *);
+
+static int is_global (tree);
+static void init_operators (void);
+static void copy_lang_type (tree);
 
 /* A constraint that can be tested at compile time.  */
 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
@@ -94,8 +94,7 @@
    and whose type is the modifier list.  */
 
 tree
-make_pointer_declarator (cv_qualifiers, target)
-     tree cv_qualifiers, target;
+make_pointer_declarator (tree cv_qualifiers, tree target)
 {
   if (target && TREE_CODE (target) == IDENTIFIER_NODE
       && ANON_AGGRNAME_P (target))
@@ -114,8 +113,7 @@
    and whose type is the modifier list.  */
 
 tree
-make_reference_declarator (cv_qualifiers, target)
-     tree cv_qualifiers, target;
+make_reference_declarator (tree cv_qualifiers, tree target)
 {
   target = build_nt (ADDR_EXPR, target);
   TREE_TYPE (target) = cv_qualifiers;
@@ -123,8 +121,8 @@
 }
 
 tree
-make_call_declarator (target, parms, cv_qualifiers, exception_specification)
-     tree target, parms, cv_qualifiers, exception_specification;
+make_call_declarator (tree target, tree parms, tree cv_qualifiers, 
+                      tree exception_specification)
 {
   target = build_nt (CALL_EXPR, target,
 		     tree_cons (parms, cv_qualifiers, NULL_TREE),
@@ -136,8 +134,8 @@
 }
 
 void
-set_quals_and_spec (call_declarator, cv_qualifiers, exception_specification)
-     tree call_declarator, cv_qualifiers, exception_specification;
+set_quals_and_spec (tree call_declarator, tree cv_qualifiers, 
+                    tree exception_specification)
 {
   CALL_DECLARATOR_QUALS (call_declarator) = cv_qualifiers;
   CALL_DECLARATOR_EXCEPTION_SPEC (call_declarator) = exception_specification;
@@ -151,7 +149,7 @@
 
 /* Initialization before switch parsing.  */
 int
-cxx_init_options ()
+cxx_init_options (void)
 {
   /* Default exceptions on.  */
   flag_exceptions = 1;
@@ -166,7 +164,7 @@
 }
 
 void
-cxx_finish ()
+cxx_finish (void)
 {
   c_common_finish ();
 }
@@ -184,7 +182,7 @@
 #undef DEF_OPERATOR
 
 static void
-init_operators ()
+init_operators (void)
 {
   tree identifier;
   char buffer[256];
@@ -367,7 +365,7 @@
 };
 
 void
-init_reswords ()
+init_reswords (void)
 {
   unsigned int i;
   tree id;
@@ -386,7 +384,7 @@
 }
 
 static void
-init_cp_pragma ()
+init_cp_pragma (void)
 {
   c_register_pragma (0, "vtable", handle_pragma_vtable);
   c_register_pragma (0, "unit", handle_pragma_unit);
@@ -461,7 +459,7 @@
    information.  */
 
 void
-extract_interface_info ()
+extract_interface_info (void)
 {
   struct c_fileinfo *finfo = 0;
 
@@ -483,8 +481,7 @@
    INTERFACE/IMPLEMENTATION pair.  Otherwise, return 0.  */
 
 static int
-interface_strcmp (s)
-     const char *s;
+interface_strcmp (const char* s)
 {
   /* Set the interface/implementation bits for this scope.  */
   struct impl_files *ifiles;
@@ -521,8 +518,7 @@
 }
 
 void
-note_got_semicolon (type)
-     tree type;
+note_got_semicolon (tree type)
 {
   if (!TYPE_P (type))
     abort ();
@@ -531,8 +527,7 @@
 }
 
 void
-note_list_got_semicolon (declspecs)
-     tree declspecs;
+note_list_got_semicolon (tree declspecs)
 {
   tree link;
 
@@ -549,9 +544,7 @@
 /* Parse a #pragma whose sole argument is a string constant.
    If OPT is true, the argument is optional.  */
 static tree
-parse_strconst_pragma (name, opt)
-     const char *name;
-     int opt;
+parse_strconst_pragma (const char* name, int opt)
 {
   tree result, x;
   enum cpp_ttype t;
@@ -573,24 +566,21 @@
 }
 
 static void
-handle_pragma_vtable (dfile)
-     cpp_reader *dfile ATTRIBUTE_UNUSED;
+handle_pragma_vtable (cpp_reader* dfile ATTRIBUTE_UNUSED )
 {
   parse_strconst_pragma ("vtable", 0);
   sorry ("#pragma vtable no longer supported");
 }
 
 static void
-handle_pragma_unit (dfile)
-     cpp_reader *dfile ATTRIBUTE_UNUSED;
+handle_pragma_unit (cpp_reader* dfile ATTRIBUTE_UNUSED )
 {
   /* Validate syntax, but don't do anything.  */
   parse_strconst_pragma ("unit", 0);
 }
 
 static void
-handle_pragma_interface (dfile)
-     cpp_reader *dfile ATTRIBUTE_UNUSED;
+handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED )
 {
   tree fname = parse_strconst_pragma ("interface", 1);
   struct c_fileinfo *finfo;
@@ -632,8 +622,7 @@
    a matching #p interface for this to have any effect.  */
 
 static void
-handle_pragma_implementation (dfile)
-     cpp_reader *dfile ATTRIBUTE_UNUSED;
+handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED )
 {
   tree fname = parse_strconst_pragma ("implementation", 1);
   const char *main_filename;
@@ -674,8 +663,7 @@
 
 /* Indicate that this file uses Java-personality exception handling.  */
 static void
-handle_pragma_java_exceptions (dfile)
-     cpp_reader *dfile ATTRIBUTE_UNUSED;
+handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED )
 {
   tree x;
   if (c_lex (&x) != CPP_EOF)
@@ -687,8 +675,7 @@
 /* Return true if d is in a global scope.  */
 
 static int
-is_global (d)
-  tree d;
+is_global (tree d)
 {
   while (1)
     switch (TREE_CODE (d))
@@ -740,9 +727,7 @@
 }
 
 tree
-do_identifier (token, args)
-     register tree token;
-     tree args;
+do_identifier (register tree token, tree args)
 {
   register tree id;
 
@@ -821,9 +806,7 @@
 }
 
 tree
-do_scoped_id (token, id)
-     tree token;
-     tree id;
+do_scoped_id (tree token, tree id)
 {
   timevar_push (TV_NAME_LOOKUP);
   if (!id || (TREE_CODE (id) == FUNCTION_DECL
@@ -872,8 +855,7 @@
 }
 
 tree
-identifier_typedecl_value (node)
-     tree node;
+identifier_typedecl_value (tree node)
 {
   tree t, type;
   type = IDENTIFIER_TYPE_VALUE (node);
@@ -932,10 +914,7 @@
 #endif
 
 tree
-build_lang_decl (code, name, type)
-     enum tree_code code;
-     tree name;
-     tree type;
+build_lang_decl (enum tree_code code, tree name, tree type)
 {
   tree t;
 
@@ -949,8 +928,7 @@
    and pushdecl (for functions generated by the backend).  */
 
 void
-retrofit_lang_decl (t)
-     tree t;
+retrofit_lang_decl (tree t)
 {
   struct lang_decl *ld;
   size_t size;
@@ -984,8 +962,7 @@
 }
 
 void
-cxx_dup_lang_specific_decl (node)
-     tree node;
+cxx_dup_lang_specific_decl (tree node)
 {
   int size;
   struct lang_decl *ld;
@@ -1010,8 +987,7 @@
 /* Copy DECL, including any language-specific parts.  */
 
 tree
-copy_decl (decl)
-     tree decl;
+copy_decl (tree decl)
 {
   tree copy;
 
@@ -1023,8 +999,7 @@
 /* Replace the shared language-specific parts of NODE with a new copy.  */
 
 static void
-copy_lang_type (node)
-     tree node;
+copy_lang_type (tree node)
 {
   int size;
   struct lang_type *lt;
@@ -1049,8 +1024,7 @@
 /* Copy TYPE, including any language-specific parts.  */
 
 tree
-copy_type (type)
-     tree type;
+copy_type (tree type)
 {
   tree copy;
 
@@ -1060,8 +1034,7 @@
 }
 
 tree
-cxx_make_type (code)
-     enum tree_code code;
+cxx_make_type (enum tree_code code)
 {
   register tree t = make_node (code);
 
@@ -1113,8 +1086,7 @@
 }
 
 tree
-make_aggr_type (code)
-     enum tree_code code;
+make_aggr_type (enum tree_code code)
 {
   tree t = cxx_make_type (code);
 
@@ -1128,8 +1100,7 @@
    RID.  */
 
 int
-cp_type_qual_from_rid (rid)
-     tree rid;
+cp_type_qual_from_rid (tree rid)
 {
   if (rid == ridpointers[(int) RID_CONST])
     return TYPE_QUAL_CONST;
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.3419
diff -u -r1.3419 ChangeLog
--- ChangeLog	13 Jun 2003 15:07:48 -0000	1.3419
+++ ChangeLog	13 Jun 2003 15:40:32 -0000
@@ -1,5 +1,7 @@
 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
 
+	* lex.c: Convert to ISO C.
+
 	2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
 	* init.c: removes use of PARAMS macro.  Use ISO style function
 	declarations.  (Not copyright-significant change.)


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