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]

C++: Naming the standard properly


This patch replaces 'ANSI C++' with 'ISO C++' in a number of places;
this attributes the standard more accurately.

I've also changed the wording of comments that refer to drafts and
working papers, as long as they still apply to the published standard.

I haven't changed the naming of internal variables, and neither the
naming of command line flags (i.e. it is still -ansi). Also, I haven't
touched the C compiler, and I have left references to standard C as
'ANSI C' in a number of places.

Please let me know what you think.

Regards,
Martin

2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>

	* call.c (build_conditional_expr): Replace ANSI with ISO.
	* class.c (finish_struct_anon): Likewise.
	* decl.c (start_decl, grok_reference_init): Likewise.
	(check_static_variable_definition, compute_array_index_type,
	compute_array_index_type, grokdeclarator): Likewise.
	* expr.c (do_case): Likewise.
	* lex.c (consume_string, readescape, do_identifier): Likewise.
	(parse_float, real_yylex): Likewise.
	* parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
	(unary_expr, new_initializer, cast_expr, primary, primary_no_id,
	new_type_id, maybe_label_decls, simple_stmt, 
	for.init.statement): Likewise.
	* pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
	* semantics.c (finish_named_return_value): Likewise.
	* parse.c: Regenerate.

Index: call.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/call.c,v
retrieving revision 1.193
diff -u -p -r1.193 call.c
--- call.c	2000/02/16 23:54:21	1.193
+++ call.c	2000/02/21 09:15:08
@@ -1926,7 +1926,7 @@ type_decays_to (type)
    1) bool-taking candidates.  These are the same regardless of the input.
    2) pointer-pair taking candidates.  These are generated for each type
       one of the input types converts to.
-   3) arithmetic candidates.  According to the WP, we should generate
+   3) arithmetic candidates.  According to the standard, we should generate
       all of these, but I'm trying not to... */
 
 static struct z_candidate *
@@ -2773,7 +2773,7 @@ build_conditional_expr (arg1, arg2, arg3
   if (!arg2)
     {
       if (pedantic)
-	pedwarn ("ANSI C++ forbids omitting the middle term of a ?: expression");
+	pedwarn ("ISO C++ forbids omitting the middle term of a ?: expression");
       arg1 = arg2 = save_expr (arg1);
     }
 
@@ -4884,10 +4884,10 @@ joust (cand1, cand2, warn)
   /* for some argument j, ICSj(F1) is a better conversion  sequence  than
      ICSj(F2) */
 
-  /* For comparing static and non-static member functions, we ignore the
-     implicit object parameter of the non-static function.  The WP says to
-     pretend that the static function has an object parm, but that won't
-     work with operator overloading.  */
+  /* For comparing static and non-static member functions, we ignore
+     the implicit object parameter of the non-static function.  The
+     standard says to pretend that the static function has an object
+     parm, but that won't work with operator overloading.  */
   len = TREE_VEC_LENGTH (cand1->convs);
   if (len != TREE_VEC_LENGTH (cand2->convs))
     {
Index: class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.260
diff -u -p -r1.260 class.c
--- class.c	2000/02/20 23:24:58	1.260
+++ class.c	2000/02/21 09:15:15
@@ -3384,7 +3384,7 @@ finish_struct_anon (t)
 		continue;
 
 	      if (DECL_NAME (elt) == constructor_name (t))
-		cp_pedwarn_at ("ANSI C++ forbids member `%D' with same name as enclosing class",
+		cp_pedwarn_at ("ISO C++ forbids member `%D' with same name as enclosing class",
 			       elt);
 
 	      if (TREE_CODE (elt) != FIELD_DECL)
Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.404
diff -u -p -r1.404 cp-tree.h
--- cp-tree.h	2000/02/20 01:10:49	1.404
+++ cp-tree.h	2000/02/21 09:15:21
@@ -480,7 +480,7 @@ struct tree_srcloc
               OPERATOR_TYPENAME_FORMAT,			\
 	      strlen (OPERATOR_TYPENAME_FORMAT)))
 
-/* Nonzero means reject anything that ANSI standard C forbids.  */
+/* Nonzero means reject anything that ISO standard C++ forbids.  */
 extern int pedantic;
 
 /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only.  */
@@ -1106,8 +1106,9 @@ extern int interface_only, interface_unk
 
 extern int flag_elide_constructors;
 
-/* Nonzero means enable obscure ANSI features and disable GNU extensions
-   that might cause ANSI-compliant code to be miscompiled.  */
+/* Nonzero means enable obscure standard features and disable GNU
+   extensions that might cause standard-compliant code to be
+   miscompiled.  */
 
 extern int flag_ansi;
 
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.547
diff -u -p -r1.547 decl.c
--- decl.c	2000/02/20 01:10:49	1.547
+++ decl.c	2000/02/21 09:15:37
@@ -454,7 +454,7 @@ struct binding_level
     tree incomplete;
 
     /* List of VAR_DECLS saved from a previous for statement.
-       These would be dead in ANSI-conforming code, but might
+       These would be dead in ISO-conforming code, but might
        be referenced in ARM-era code.  These are stored in a
        TREE_LIST; the TREE_VALUE is the actual declaration.  */
     tree dead_vars_from_for;
@@ -485,7 +485,7 @@ struct binding_level
     unsigned namespace_p : 1;
 
     /* True if this level is that of a for-statement where we need to
-       worry about ambiguous (ARM or ANSI) scope rules.  */
+       worry about ambiguous (ARM or ISO) scope rules.  */
     unsigned is_for_scope : 1;
 
     /* True if this level corresponds to an EH region, as for a try block.  */
@@ -4510,7 +4510,7 @@ implicitly_declare (functionid)
   DECL_EXTERNAL (decl) = 1;
   TREE_PUBLIC (decl) = 1;
 
-  /* ANSI standard says implicit declarations are in the innermost block.
+  /* ISO standard says implicit declarations are in the innermost block.
      So we record the decl in the standard fashion.  */
   pushdecl (decl);
   rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
@@ -6509,8 +6509,7 @@ fixup_anonymous_aggr (t)
 	q = &TREE_CHAIN (*q);
     }
 
-  /* ANSI C++ June 5 1992 WP 9.5.3.  Anonymous unions may not have
-     function members.  */
+  /* ISO C++ 9.5.3.  Anonymous unions may not have function members.  */
   if (TYPE_METHODS (t))
     error ("an anonymous union cannot have function members");
 }
@@ -6789,7 +6788,7 @@ start_decl (declarator, declspecs, initi
 	    {
 	      if (DECL_CONTEXT (field) != context)
 		{
-		  cp_pedwarn ("ANSI C++ does not permit `%T::%D' to be defined as `%T::%D'",
+		  cp_pedwarn ("ISO C++ does not permit `%T::%D' to be defined as `%T::%D'",
 			      DECL_CONTEXT (field), DECL_NAME (decl),
 			      context, DECL_NAME (decl));
 		  DECL_CONTEXT (decl) = DECL_CONTEXT (field);
@@ -6959,7 +6958,7 @@ grok_reference_init (decl, type, init)
 
   if (TREE_CODE (init) == CONSTRUCTOR)
     {
-      cp_error ("ANSI C++ forbids use of initializer list to initialize reference `%D'", decl);
+      cp_error ("ISO C++ forbids use of initializer list to initialize reference `%D'", decl);
       return;
     }
 
@@ -8879,10 +8878,10 @@ check_static_variable_definition (decl, 
       return 1;
     }
   else if (!CP_TYPE_CONST_P (type))
-    cp_error ("ANSI C++ forbids in-class initialization of non-const static member `%D'",
+    cp_error ("ISO C++ forbids in-class initialization of non-const static member `%D'",
 	      decl);
   else if (pedantic && !INTEGRAL_TYPE_P (type))
-    cp_pedwarn ("ANSI C++ forbids initialization of member constant `%D' of non-integral type `%T'", decl, type);
+    cp_pedwarn ("ISO C++ forbids initialization of member constant `%D' of non-integral type `%T'", decl, type);
 
   return 0;
 }
@@ -8966,9 +8965,9 @@ compute_array_index_type (name, size)
       else if (integer_zerop (size) && pedantic && !in_system_header)
 	{
 	  if (name)
-	    cp_pedwarn ("ANSI C++ forbids zero-size array `%D'", name);
+	    cp_pedwarn ("ISO C++ forbids zero-size array `%D'", name);
 	  else
-	    cp_pedwarn ("ANSI C++ forbids zero-size array");
+	    cp_pedwarn ("ISO C++ forbids zero-size array");
 	}
     }
 
@@ -8987,10 +8986,10 @@ compute_array_index_type (name, size)
       if (pedantic)
 	{
 	  if (name)
-	    cp_pedwarn ("ANSI C++ forbids variable-size array `%D'",
+	    cp_pedwarn ("ISO C++ forbids variable-size array `%D'",
 			name);
 	  else
-	    cp_pedwarn ("ANSI C++ forbids variable-size array");
+	    cp_pedwarn ("ISO C++ forbids variable-size array");
 	}
 
       /* Create a variable-sized array index type.  */
@@ -9604,7 +9603,7 @@ grokdeclarator (declarator, declspecs, d
 		  if (i == (int) RID_LONG && RIDBIT_SETP (i, specbits))
 		    {
 		      if (pedantic && ! in_system_header && warn_long_long)
-			pedwarn ("ANSI C++ does not support `long long'");
+			pedwarn ("ISO C++ does not support `long long'");
 		      if (longlong)
 			error ("`long long long' is too long for GCC");
 		      else
@@ -9694,10 +9693,10 @@ grokdeclarator (declarator, declspecs, d
 	  if (in_system_header || flag_ms_extensions)
 	    /* Allow it, sigh.  */;
 	  else if (pedantic || ! is_main)
-	    cp_pedwarn ("ANSI C++ forbids declaration of `%s' with no type",
+	    cp_pedwarn ("ISO C++ forbids declaration of `%s' with no type",
 			name);
 	  else if (warn_return_type)
-	    cp_warning ("ANSI C++ forbids declaration of `%s' with no type",
+	    cp_warning ("ISO C++ forbids declaration of `%s' with no type",
 			name);
 
 	  type = integer_type_node;
@@ -10175,9 +10174,9 @@ grokdeclarator (declarator, declspecs, d
 
 		if (flags == DTOR_FLAG)
 		  {
-		    /* ANSI C++ June 5 1992 WP 12.4.1.  A destructor may
-		       not be declared const or volatile.  A destructor
-		       may not be static.  */
+		    /* ISO C++ 12.4/2.  A destructor may not be
+		       declared const or volatile.  A destructor may
+		       not be static.  */
 		    if (staticp == 2)
 		      error ("destructor cannot be static member function");
 		    if (quals)
@@ -10198,9 +10197,10 @@ grokdeclarator (declarator, declspecs, d
 		  {
 		    if (explicitp == 1)
 		      explicitp = 2;
-		    /* ANSI C++ June 5 1992 WP 12.1.2.  A constructor may
-		       not be declared const or volatile.  A constructor may
-		       not be virtual.  A constructor may not be static.  */
+		    /* ISO C++ 12.1.  A constructor may not be
+		       declared const or volatile.  A constructor may
+		       not be virtual.  A constructor may not be
+		       static.  */
 		    if (staticp == 2)
 		      error ("constructor cannot be static member function");
 		    if (virtualp)
@@ -10655,7 +10655,7 @@ grokdeclarator (declarator, declspecs, d
       if (decl_context == FIELD)
 	{
 	  if (declarator == constructor_name (current_class_type))
-	    cp_pedwarn ("ANSI C++ forbids nested type `%D' with same name as enclosing class",
+	    cp_pedwarn ("ISO C++ forbids nested type `%D' with same name as enclosing class",
 			declarator);
 	  decl = build_lang_decl (TYPE_DECL, declarator, type);
 	}
@@ -11100,7 +11100,7 @@ grokdeclarator (declarator, declspecs, d
 		       the rest of the compiler does not correctly
 		       handle the initialization unless the member is
 		       static so we make it static below.  */
-		    cp_pedwarn ("ANSI C++ forbids initialization of member `%D'",
+		    cp_pedwarn ("ISO C++ forbids initialization of member `%D'",
 				declarator);
 		    cp_pedwarn ("making `%D' static", declarator);
 		    staticp = 1;
@@ -11125,7 +11125,7 @@ grokdeclarator (declarator, declspecs, d
 		   allow non-static data members here, because C does
 		   and /usr/include/netinet/in.h uses that.  */
 		&& (staticp || ! in_system_header))
-	      cp_pedwarn ("ANSI C++ forbids data member `%D' with same name as enclosing class",
+	      cp_pedwarn ("ISO C++ forbids data member `%D' with same name as enclosing class",
 			  declarator);
 
 	    if (staticp)
@@ -12004,7 +12004,7 @@ grok_op_properties (decl, virtualp, frie
       else if (name == ansi_opname[(int) COND_EXPR])
 	{
 	  /* 13.4.0.3 */
-	  cp_error ("ANSI C++ prohibits overloading operator ?:");
+	  cp_error ("ISO C++ prohibits overloading operator ?:");
 	}
       else if (ambi_op_p (name))
 	{
@@ -12954,9 +12954,8 @@ start_function (declspecs, declarator, a
       if (TREE_CODE (fntype) == METHOD_TYPE)
 	ctype = TYPE_METHOD_BASETYPE (fntype);
 
-      /* ANSI C++ June 5 1992 WP 11.4.5.  A friend function defined in a
-	 class is in the (lexical) scope of the class in which it is
-	 defined.  */
+      /* ISO C++ 11.4/5.  A friend function defined in a class is in
+	 the (lexical) scope of the class in which it is defined.  */
       if (!ctype && DECL_FRIEND_P (decl1))
 	{
 	  ctype = DECL_FRIEND_CONTEXT (decl1);
Index: decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.309
diff -u -p -r1.309 decl2.c
--- decl2.c	2000/02/18 06:00:36	1.309
+++ decl2.c	2000/02/21 09:15:42
@@ -171,8 +171,9 @@ int flag_traditional;
 
 int flag_signed_bitfields = 1;
 
-/* Nonzero means enable obscure ANSI features and disable GNU extensions
-   that might cause ANSI-compliant code to be miscompiled.  */
+/* Nonzero means enable obscure standard features and disable GNU
+   extensions that might cause standard-compliant code to be
+   miscompiled.  */
 
 int flag_ansi;
 
@@ -422,11 +423,11 @@ int flag_operator_names;
 
 int flag_check_new;
 
-/* Nonzero if we want the new ANSI rules for pushing a new scope for `for'
+/* Nonzero if we want the new ISO rules for pushing a new scope for `for'
    initialization variables.
    0: Old rules, set by -fno-for-scope.
-   2: New ANSI rules, set by -ffor-scope.
-   1: Try to implement new ANSI rules, but with backup compatibility
+   2: New ISO rules, set by -ffor-scope.
+   1: Try to implement new ISO rules, but with backup compatibility
    (and warnings).  This is the default, for now.  */
 
 int flag_new_for_scope = 1;
@@ -455,7 +456,7 @@ int flag_honor_std;
 
 int flag_inline_trees = 0;
 
-/* Maximum template instantiation depth. Must be at least 17 for ANSI
+/* Maximum template instantiation depth. Must be at least 17 for ISO
    compliance. */
 
 int max_tinst_depth = 17;
Index: except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/except.c,v
retrieving revision 1.95
diff -u -p -r1.95 except.c
--- except.c	2000/01/26 20:51:34	1.95
+++ except.c	2000/02/21 09:15:43
@@ -763,7 +763,7 @@ expand_throw (exp)
 	{
 	  tree object, ptr;
 
-	  /* OK, this is kind of wacky.  The WP says that we call
+	  /* OK, this is kind of wacky.  The standard says that we call
 	     terminate when the exception handling mechanism, after
 	     completing evaluation of the expression to be thrown but
 	     before the exception is caught (_except.throw_), calls a
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/expr.c,v
retrieving revision 1.40
diff -u -p -r1.40 expr.c
--- expr.c	2000/01/26 20:51:34	1.40
+++ expr.c	2000/02/21 09:15:43
@@ -290,7 +290,7 @@ do_case (start, end)
     error ("pointers are not permitted as case values");
 
   if (end && pedantic)
-    pedwarn ("ANSI C++ forbids range expressions in switch statement");
+    pedwarn ("ISO C++ forbids range expressions in switch statement");
 
   if (start)
     value1 = check_cp_case_value (start);
Index: init.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/init.c,v
retrieving revision 1.164
diff -u -p -r1.164 init.c
--- init.c	2000/01/26 20:51:34	1.164
+++ init.c	2000/02/21 09:15:47
@@ -2919,7 +2919,7 @@ build_vec_init (decl, base, maxindex, in
    things like padding and magic size cookies.  It has virtual in it,
    because if you have a base pointer and you delete through a virtual
    destructor, it should be the size of the dynamic object, not the
-   static object, see Free Store 12.5 ANSI C++ WP.
+   static object, see Free Store 12.5 ISO C++.
 
    This does not call any destructors.  */
 
Index: lex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lex.c,v
retrieving revision 1.177
diff -u -p -r1.177 lex.c
--- lex.c	2000/02/17 20:45:48	1.177
+++ lex.c	2000/02/21 09:15:51
@@ -1421,7 +1421,7 @@ consume_string (this_obstack, matching_c
       if (c == '\n')
 	{
 	  if (pedantic)
-	    pedwarn ("ANSI C++ forbids newline in string constant");
+	    pedwarn ("ISO C++ forbids newline in string constant");
 	  lineno++;
 	}
       obstack_1grow (this_obstack, c);
@@ -2912,7 +2912,7 @@ readescape (ignore_ptr)
     case 'e':
     case 'E':
       if (pedantic)
-	pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
+	pedwarn ("non-ISO-standard escape sequence, `\\%c'", c);
       return 033;
 
     case '?':
@@ -3148,7 +3148,7 @@ do_identifier (token, parsing, args)
 	    {
 	      warning ("name lookup of `%s' changed",
 		       IDENTIFIER_POINTER (token));
-	      cp_warning_at ("  matches this `%D' under current ANSI rules",
+	      cp_warning_at ("  matches this `%D' under ISO standard rules",
 			     shadowed);
 	      cp_warning_at ("  matches this `%D' under old rules", id);
 	      DECL_ERROR_REPORTED (id) = 1;
@@ -3160,14 +3160,14 @@ do_identifier (token, parsing, args)
 	  DECL_ERROR_REPORTED (id) = 1;
 	  if (TYPE_NEEDS_DESTRUCTOR (TREE_TYPE (id)))
 	    {
-	      error ("name lookup of `%s' changed for new ANSI `for' scoping",
+	      error ("name lookup of `%s' changed for new ISO `for' scoping",
 		     IDENTIFIER_POINTER (token));
 	      cp_error_at ("  cannot use obsolete binding at `%D' because it has a destructor", id);
 	      id = error_mark_node;
 	    }
 	  else
 	    {
-	      pedwarn ("name lookup of `%s' changed for new ANSI `for' scoping",
+	      pedwarn ("name lookup of `%s' changed for new ISO `for' scoping",
 		       IDENTIFIER_POINTER (token));
 	      cp_pedwarn_at ("  using obsolete binding at `%D'", id);
 	    }
@@ -3361,7 +3361,7 @@ parse_float (data)
 	  if (args->imag)
 	    error ("more than one `i' or `j' in numeric constant");
 	  else if (pedantic)
-	    pedwarn ("ANSI C++ forbids imaginary numeric constants");
+	    pedwarn ("ISO C++ forbids imaginary numeric constants");
 	  args->imag = 1;
 	  break;
 
@@ -4043,7 +4043,7 @@ real_yylex ()
 			if (spec_long_long)
 			  error ("three `l's in integer constant");
 			else if (pedantic && ! in_system_header && warn_long_long)
-			  pedwarn ("ANSI C++ forbids long long integer constants");
+			  pedwarn ("ISO C++ forbids long long integer constants");
 			spec_long_long = 1;
 		      }
 		    spec_long = 1;
@@ -4053,7 +4053,7 @@ real_yylex ()
 		    if (spec_imag)
 		      error ("more than one `i' or `j' in numeric constant");
 		    else if (pedantic)
-		      pedwarn ("ANSI C++ forbids imaginary numeric constants");
+		      pedwarn ("ISO C++ forbids imaginary numeric constants");
 		    spec_imag = 1;
 		  }
 		else
@@ -4204,7 +4204,7 @@ real_yylex ()
 	    else if (c == '\n')
 	      {
 		if (pedantic)
-		  pedwarn ("ANSI C forbids newline in character constant");
+		  pedwarn ("ISO C++ forbids newline in character constant");
 		lineno++;
 	      }
 	    else
@@ -4366,7 +4366,7 @@ real_yylex ()
 	    else if (c == '\n')
 	      {
 		if (pedantic)
-		  pedwarn ("ANSI C++ forbids newline in string constant");
+		  pedwarn ("ISO C++ forbids newline in string constant");
 		lineno++;
 	      }
 	    else
Index: parse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/parse.c,v
retrieving revision 1.153
diff -u -p -r1.153 parse.c
--- parse.c	2000/02/18 22:42:05	1.153
+++ parse.c	2000/02/21 09:16:00
@@ -1,6 +1,7 @@
 
 /*  A Bison parser, made from parse.y
-    by GNU Bison version 1.28  */
+ by  GNU Bison version 1.27
+  */
 
 #define YYBISON 1  /* Identify Bison output.  */
 
@@ -4027,8 +4028,8 @@ static const short yycheck[] = {     4,
     78,    79,    80,    81,    82,    83,    84,    85
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.28.  */
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.27.  */
 
 /* Skeleton output parser for bison,
    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -4241,7 +4242,7 @@ __yy_memcpy (char *to, char *from, unsig
 #endif
 #endif
 
-#line 217 "/usr/lib/bison.simple"
+#line 216 "/usr/share/bison.simple"
 
 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
    into yyparse.  The argument should have type void *.
@@ -5266,7 +5267,7 @@ case 191:
     break;}
 case 193:
 #line 1057 "parse.y"
-{ error ("ANSI C++ forbids an empty condition for `%s'",
+{ error ("ISO C++ forbids an empty condition for `%s'",
 			 cond_stmt_keyword);
 		  yyval.ttype = integer_zero_node; ;
     break;}
@@ -5276,7 +5277,7 @@ case 194:
     break;}
 case 195:
 #line 1066 "parse.y"
-{ error ("ANSI C++ forbids an empty condition for `%s'",
+{ error ("ISO C++ forbids an empty condition for `%s'",
 			 cond_stmt_keyword);
 		  yyval.ttype = integer_zero_node; ;
     break;}
@@ -5376,7 +5377,7 @@ case 221:
 case 222:
 #line 1159 "parse.y"
 { if (pedantic)
-		    pedwarn ("ANSI C++ forbids `&&'");
+		    pedwarn ("ISO C++ forbids `&&'");
   		  yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ;
     break;}
 case 223:
@@ -5495,7 +5496,7 @@ case 246:
 #line 1243 "parse.y"
 {
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids initialization of new expression with `='");
+		    pedwarn ("ISO C++ forbids initialization of new expression with `='");
 		  if (TREE_CODE (yyvsp[0].ttype) != TREE_LIST
 		      && TREE_CODE (yyvsp[0].ttype) != CONSTRUCTOR)
 		    yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype);
@@ -5525,7 +5526,7 @@ case 251:
 		  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
 					nreverse (yyvsp[-2].ttype)); 
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids constructor-expressions");
+		    pedwarn ("ISO C++ forbids constructor-expressions");
 		  /* Indicate that this was a GNU C constructor expression.  */
 		  TREE_HAS_CONSTRUCTOR (init) = 1;
 
@@ -5746,7 +5747,7 @@ case 312:
 		      YYERROR;
 		    }
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids braced-groups within expressions");  
+		    pedwarn ("ISO C++ forbids braced-groups within expressions");  
 		  yyval.ttype = begin_stmt_expr (); 
 		;
     break;}
@@ -6536,7 +6537,7 @@ case 480:
 		  else
 		    {
 		      yyval.ftype.t = yyvsp[0].ftype.t;
-		      /* struct B: public A; is not accepted by the WP grammar.  */
+		      /* struct B: public A; is not accepted by the standard grammar.  */
 		      if (CLASS_TYPE_P (yyval.ftype.t)
 			  && TYPE_BINFO_BASETYPES (yyval.ftype.t) 
 			  && !TYPE_SIZE (yyval.ftype.t)
@@ -7007,7 +7008,7 @@ case 575:
 #line 2667 "parse.y"
 {
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new");
+		    pedwarn ("ISO C++ forbids array dimensions with parenthesized type in new");
 		  yyval.ftype.t = build_parse_node (ARRAY_REF, TREE_VALUE (yyvsp[-4].ftype.t), yyvsp[-1].ttype);
 		  yyval.ftype.t = build_decl_list (TREE_PURPOSE (yyvsp[-4].ftype.t), yyval.ftype.t);
 		  yyval.ftype.new_type_flag = yyvsp[-4].ftype.new_type_flag;
@@ -7543,7 +7544,7 @@ case 697:
 case 704:
 #line 3167 "parse.y"
 { if (pedantic)
-		    pedwarn ("ANSI C++ forbids label declarations"); ;
+		    pedwarn ("ISO C++ forbids label declarations"); ;
     break;}
 case 707:
 #line 3178 "parse.y"
@@ -7745,7 +7746,7 @@ case 756:
 #line 3319 "parse.y"
 { 
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids computed gotos");
+		    pedwarn ("ISO C++ forbids computed gotos");
 		  finish_goto_stmt (yyvsp[-1].ttype);
 		;
     break;}
@@ -7840,7 +7841,7 @@ case 784:
 case 786:
 #line 3420 "parse.y"
 { if (pedantic)
-		    pedwarn ("ANSI C++ forbids compound statements inside for initializations");
+		    pedwarn ("ISO C++ forbids compound statements inside for initializations");
 		;
     break;}
 case 787:
@@ -8231,7 +8232,7 @@ case 878:
     break;}
 }
    /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/lib/bison.simple"
+#line 542 "/usr/share/bison.simple"
 
   yyvsp -= yylen;
   yyssp -= yylen;
Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/parse.y,v
retrieving revision 1.164
diff -u -p -r1.164 parse.y
--- parse.y	2000/02/18 22:42:07	1.164
+++ parse.y	2000/02/21 09:16:03
@@ -1054,7 +1054,7 @@ expr:
 
 paren_expr_or_null:
 	LEFT_RIGHT
-		{ error ("ANSI C++ forbids an empty condition for `%s'",
+		{ error ("ISO C++ forbids an empty condition for `%s'",
 			 cond_stmt_keyword);
 		  $$ = integer_zero_node; }
 	| '(' expr ')'
@@ -1063,7 +1063,7 @@ paren_expr_or_null:
 
 paren_cond_or_null:
 	LEFT_RIGHT
-		{ error ("ANSI C++ forbids an empty condition for `%s'",
+		{ error ("ISO C++ forbids an empty condition for `%s'",
 			 cond_stmt_keyword);
 		  $$ = integer_zero_node; }
 	| '(' condition ')'
@@ -1157,7 +1157,7 @@ unary_expr:
 	/* Refer to the address of a label as a pointer.  */
 	| ANDAND identifier
 		{ if (pedantic)
-		    pedwarn ("ANSI C++ forbids `&&'");
+		    pedwarn ("ISO C++ forbids `&&'");
   		  $$ = finish_label_address_expr ($2); }
 	| SIZEOF unary_expr  %prec UNARY
 		{ $$ = expr_sizeof ($2); }
@@ -1242,7 +1242,7 @@ new_initializer:
 	| '=' init
 		{
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids initialization of new expression with `='");
+		    pedwarn ("ISO C++ forbids initialization of new expression with `='");
 		  if (TREE_CODE ($2) != TREE_LIST
 		      && TREE_CODE ($2) != CONSTRUCTOR)
 		    $$ = build_tree_list (NULL_TREE, $2);
@@ -1272,7 +1272,7 @@ cast_expr:
 		  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
 					nreverse ($3)); 
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids constructor-expressions");
+		    pedwarn ("ISO C++ forbids constructor-expressions");
 		  /* Indicate that this was a GNU C constructor expression.  */
 		  TREE_HAS_CONSTRUCTOR (init) = 1;
 
@@ -1467,7 +1467,7 @@ primary:
 		      YYERROR;
 		    }
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids braced-groups within expressions");  
+		    pedwarn ("ISO C++ forbids braced-groups within expressions");  
 		  $<ttype>$ = begin_stmt_expr (); 
 		}
 	  compstmt ')'
@@ -1594,7 +1594,7 @@ primary_no_id:
 		  $<ttype>$ = expand_start_stmt_expr (); }
 	  compstmt ')'
 		{ if (pedantic)
-		    pedwarn ("ANSI C++ forbids braced-groups within expressions");
+		    pedwarn ("ISO C++ forbids braced-groups within expressions");
 		  $$ = expand_end_stmt_expr ($<ttype>2); }
 	| primary_no_id '(' nonnull_exprlist ')'
 		{ $$ = build_x_function_call ($$, $3, current_class_ref); }
@@ -1704,7 +1704,7 @@ fcast_or_absdcl:
 					     NULL_TREE); }
 	;
 
-/* ANSI type-id (8.1) */
+/* ISO type-id (8.1) */
 type_id:
 	  typed_typespecs absdcl
 		{ $$.t = build_decl_list ($1.t, $2); 
@@ -2199,7 +2199,7 @@ structsp:
 		  else
 		    {
 		      $$.t = $1.t;
-		      /* struct B: public A; is not accepted by the WP grammar.  */
+		      /* struct B: public A; is not accepted by the standard grammar.  */
 		      if (CLASS_TYPE_P ($$.t)
 			  && TYPE_BINFO_BASETYPES ($$.t) 
 			  && !TYPE_SIZE ($$.t)
@@ -2653,7 +2653,7 @@ enumerator:
 		{ build_enumerator ($1, $3, current_enum_type); }
 	;
 
-/* ANSI new-type-id (5.3.4) */
+/* ISO new-type-id (5.3.4) */
 new_type_id:
 	  type_specifier_seq new_declarator
 		{ $$.t = build_decl_list ($1.t, $2); 
@@ -2666,7 +2666,7 @@ new_type_id:
 	| '(' type_id ')' '[' expr ']'
 		{
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new");
+		    pedwarn ("ISO C++ forbids array dimensions with parenthesized type in new");
 		  $$.t = build_parse_node (ARRAY_REF, TREE_VALUE ($2.t), $5);
 		  $$.t = build_decl_list (TREE_PURPOSE ($2.t), $$.t);
 		  $$.new_type_flag = $2.new_type_flag;
@@ -3051,7 +3051,7 @@ global_scope:
 		{ got_scope = void_type_node; }
 	;
 
-/* ANSI new-declarator (5.3.4) */
+/* ISO new-declarator (5.3.4) */
 new_declarator:
 	  '*' cv_qualifiers new_declarator
 		{ $$ = make_pointer_declarator ($2, $3); }
@@ -3072,7 +3072,7 @@ new_declarator:
 	| direct_new_declarator  %prec EMPTY
 	;
 
-/* ANSI direct-new-declarator (5.3.4) */
+/* ISO direct-new-declarator (5.3.4) */
 direct_new_declarator:
 	  '[' expr ']'
 		{ $$ = build_parse_node (ARRAY_REF, NULL_TREE, $2); }
@@ -3090,7 +3090,7 @@ absdcl_intern:
 		}
 	;
 	
-/* ANSI abstract-declarator (8.1) */
+/* ISO abstract-declarator (8.1) */
 absdcl:
 	  '*' nonempty_cv_qualifiers absdcl_intern
 		{ $$ = make_pointer_declarator ($2.t, $3); }
@@ -3119,7 +3119,7 @@ absdcl:
 	| direct_abstract_declarator  %prec EMPTY
 	;
 
-/* ANSI direct-abstract-declarator (8.1) */
+/* ISO direct-abstract-declarator (8.1) */
 direct_abstract_declarator:
 	  '(' absdcl_intern ')'
 		{ $$ = $2; }
@@ -3165,7 +3165,7 @@ maybe_label_decls:
 	  /* empty */
 	| label_decls
 		{ if (pedantic)
-		    pedwarn ("ANSI C++ forbids label declarations"); }
+		    pedwarn ("ISO C++ forbids label declarations"); }
 	;
 
 label_decls:
@@ -3318,7 +3318,7 @@ simple_stmt:
 	| GOTO '*' expr ';'
                 { 
 		  if (pedantic)
-		    pedwarn ("ANSI C++ forbids computed gotos");
+		    pedwarn ("ISO C++ forbids computed gotos");
 		  finish_goto_stmt ($3);
 		}
 	| GOTO identifier ';'
@@ -3418,7 +3418,7 @@ for.init.statement:
 	| decl
 	| '{' compstmtend
 		{ if (pedantic)
-		    pedwarn ("ANSI C++ forbids compound statements inside for initializations");
+		    pedwarn ("ISO C++ forbids compound statements inside for initializations");
 		}
 	;
 
Index: pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.398
diff -u -p -r1.398 pt.c
--- pt.c	2000/02/20 23:24:58	1.398
+++ pt.c	2000/02/21 09:16:13
@@ -9119,7 +9119,7 @@ do_decl_instantiation (declspecs, declar
   else if (storage == ridpointers[(int) RID_EXTERN])
     {
       if (pedantic)
-	cp_pedwarn ("ANSI C++ forbids the use of `extern' on explicit instantiations");
+	cp_pedwarn ("ISO C++ forbids the use of `extern' on explicit instantiations");
       extern_p = 1;
     }
   else
@@ -9184,7 +9184,7 @@ do_type_instantiation (t, storage)
   if (storage != NULL_TREE)
     {
       if (pedantic)
-	cp_pedwarn("ANSI C++ forbids the use of `%s' on explicit instantiations", 
+	cp_pedwarn("ISO C++ forbids the use of `%s' on explicit instantiations", 
 		   IDENTIFIER_POINTER (storage));
 
       if (storage == ridpointers[(int) RID_INLINE])
Index: semantics.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/semantics.c,v
retrieving revision 1.125
diff -u -p -r1.125 semantics.c
--- semantics.c	2000/02/18 22:42:07	1.125
+++ semantics.c	2000/02/21 09:16:15
@@ -1164,7 +1164,7 @@ finish_named_return_value (return_id, in
     /* Give this error as many times as there are occurrences,
        so that users can use Emacs compilation buffers to find
        and fix all such places.  */
-    pedwarn ("ANSI C++ does not permit named return values");
+    pedwarn ("ISO C++ does not permit named return values");
 
   if (return_id != NULL_TREE)
     {
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/typeck.c,v
retrieving revision 1.245
diff -u -p -r1.245 typeck.c
--- typeck.c	2000/02/16 23:54:23	1.245
+++ typeck.c	2000/02/21 09:16:22
@@ -5421,8 +5421,7 @@ build_c_cast (type, expr)
   if (TREE_CODE (type) == ARRAY_TYPE)
     {
       /* Allow casting from T1* to T2[] because Cfront allows it.
-	 NIHCL uses it. It is not valid ANSI C however, and hence, not
-	 valid ANSI C++.  */
+	 NIHCL uses it. It is not valid ISO C++ however.  */
       if (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE)
 	{
 	  if (pedantic)
@@ -5761,8 +5760,8 @@ build_modify_expr (lhs, modifycode, rhs)
 	tree inner_lhs = TREE_OPERAND (lhs, 0);
 	tree result;
 
-	/* WP 5.4.1:  The result is an lvalue if T is a reference type,
-	   otherwise the result is an rvalue.   */
+	/* ISO C++ 5.4/1: The result is an lvalue if T is a reference
+	   type, otherwise the result is an rvalue.  */
 	if (! lvalue_p (lhs))
 	  pedwarn ("ISO C++ forbids cast to non-reference type used as lvalue");
 

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