Commit 59be0cdd by Richard Kenner

Update comments.

From-SVN: r8817
parent db6f8fbe
/* Language-level data type conversion for GNU C++.
Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1992, 1993, 1995 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -707,7 +707,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
by San Diego WP section 5.2.9 paragraph 12, though perhaps it
should be done directly (jason). (int &)ri ---> *(int*)&ri */
/* B* bp; A& ar = (A&)bp; is legal, but it's probably not what they
/* B* bp; A& ar = (A&)bp; is valid, but it's probably not what they
meant. */
if (form == POINTER_TYPE
&& (comptypes (TREE_TYPE (intype), type, -1)))
......
/* Process declarations and variables for C compiler.
Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -7953,7 +7953,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
{
if (current_binding_level == global_binding_level)
{
/* It's common practice (and completely legal) to have a const
/* It's common practice (and completely valid) to have a const
be initialized and declared extern. */
if (! constp)
warning ("`%s' initialized and declared `extern'", name);
......@@ -8063,7 +8063,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
/* ARM $8.4.3: Since you can't have a pointer to a reference,
you can't have arrays of references. If we allowed them,
then we'd be saying x[i] is legal for an array x, but
then we'd be saying x[i] is valid for an array x, but
then you'd have to ask: what does `*(x + i)' mean? */
if (TREE_CODE (type) == REFERENCE_TYPE)
{
......
/* Process declarations and variables for C compiler.
Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1988, 1992, 1993, 1995 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -1090,7 +1090,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
return error_mark_node;
}
/* Deleting a pointer with the value zero is legal and has no effect. */
/* Deleting a pointer with the value zero is valid and has no effect. */
if (integer_zerop (t))
return build1 (NOP_EXPR, void_type_node, t);
}
......
/* Handle initialization things in C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1987, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -1090,7 +1090,7 @@ expand_member_init (exp, name, init)
If FLAGS is LOOKUP_ONLYCONVERTING then it is the = init form of
the initializer, if FLAGS is 0, then it is the (init) form.
If `init' is a CONSTRUCTOR, then we emit a warning message,
explaining that such initializations are illegal.
explaining that such initializations are invalid.
ALIAS_THIS is nonzero iff we are initializing something which is
essentially an alias for C_C_D. In this case, the base constructor
......@@ -1363,7 +1363,7 @@ expand_aggr_init_1 (binfo, true_exp, exp, init, alias_this, flags)
if (init_type == type && TREE_CODE (init) == CALL_EXPR
#if 0
/* It is legal to directly initialize from a CALL_EXPR
/* It is valid to directly initialize from a CALL_EXPR
without going through X(X&), apparently. */
&& ! TYPE_GETS_INIT_REF (type)
#endif
......
/* Breadth-first and depth-first routines for
searching multiple-inheritance lattice for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1987, 1989, 1992, 1993, 1995 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -1218,7 +1218,7 @@ lookup_field (xbasetype, name, protect, want_type)
/* See if we can find NAME in TYPE. If RVAL is nonzero,
and we do find NAME in TYPE, verify that such a second
sighting is in fact legal. */
sighting is in fact valid. */
nval = lookup_field_1 (type, name);
......@@ -1694,7 +1694,7 @@ lookup_fnfields (basetype_path, name, complain)
/* See if we can find NAME in TYPE. If RVAL is nonzero,
and we do find NAME in TYPE, verify that such a second
sighting is in fact legal. */
sighting is in fact valid. */
index = lookup_fnfields_here (type, name);
......
/* Build expressions with type checking for C++ compiler.
Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
......@@ -548,14 +548,14 @@ comp_array_types (cmp, t1, t2, strict)
2 : strict, except that if one type is a reference and
the other is not, compare the target type of the
reference to the type that's not a reference (ARM, p308).
This is used for checking for illegal overloading.
This is used for checking for invalid overloading.
1 : strict (compared according to ANSI C)
This is used for checking whether two function decls match.
0 : <= (compared according to C++)
-1: <= or >= (relaxed)
Otherwise, pointers involving base classes and derived classes
can be mixed as legal: i.e. a pointer to a base class may be assigned
can be mixed as valid: i.e. a pointer to a base class may be assigned
to a pointer to one of its derived classes, as per C++. A pointer to
a derived class may be passed as a parameter to a function expecting a
pointer to a base classes. These allowances do not commute. In this
......@@ -1903,7 +1903,7 @@ build_array_ref (array, idx)
}
/* Note in C++ we don't bother warning about subscripting a
`register' array, since it's legal in C++ to take the address
`register' array, since it's valid in C++ to take the address
of something with that storage specification. */
if (pedantic && !lvalue_p (array))
pedwarn ("ANSI C++ forbids subscripting non-lvalue array");
......@@ -5948,7 +5948,7 @@ build_modify_expr (lhs, modifycode, rhs)
slot = TREE_OPERAND (newrhs, 0);
else if (TREE_CODE (newrhs) == ADDR_EXPR)
{
/* Bad but legal. */
/* Bad but valid. */
slot = newrhs;
warning ("address taken of temporary object");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment