call.c (standard_conversion): Return NULL instead of 0.
* call.c (standard_conversion): Return NULL instead of 0. (build_user_type_conversion_1): Likewise. (tourney): Likewise. * decl.c (redeclaration_error_message): Likewise. * error.c (language_to_string): Likewise. From-SVN: r110976
This commit is contained in:
parent
98035a75ac
commit
6aed477a55
|
@ -1,3 +1,11 @@
|
||||||
|
2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||||
|
|
||||||
|
* call.c (standard_conversion): Return NULL instead of 0.
|
||||||
|
(build_user_type_conversion_1): Likewise.
|
||||||
|
(tourney): Likewise.
|
||||||
|
* decl.c (redeclaration_error_message): Likewise.
|
||||||
|
* error.c (language_to_string): Likewise.
|
||||||
|
|
||||||
2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||||
|
|
||||||
* cp-tree.h (warn_hidden): Remove prototype.
|
* cp-tree.h (warn_hidden): Remove prototype.
|
||||||
|
|
|
@ -768,7 +768,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
|
||||||
|| !compparms (TREE_CHAIN (TYPE_ARG_TYPES (fromfn)),
|
|| !compparms (TREE_CHAIN (TYPE_ARG_TYPES (fromfn)),
|
||||||
TREE_CHAIN (TYPE_ARG_TYPES (tofn)))
|
TREE_CHAIN (TYPE_ARG_TYPES (tofn)))
|
||||||
|| cp_type_quals (fbase) != cp_type_quals (tbase))
|
|| cp_type_quals (fbase) != cp_type_quals (tbase))
|
||||||
return 0;
|
return NULL;
|
||||||
|
|
||||||
from = cp_build_qualified_type (tbase, cp_type_quals (fbase));
|
from = cp_build_qualified_type (tbase, cp_type_quals (fbase));
|
||||||
from = build_method_type_directly (from,
|
from = build_method_type_directly (from,
|
||||||
|
@ -806,7 +806,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
|
||||||
|| tcode == REAL_TYPE)
|
|| tcode == REAL_TYPE)
|
||||||
{
|
{
|
||||||
if (! (INTEGRAL_CODE_P (fcode) || fcode == REAL_TYPE))
|
if (! (INTEGRAL_CODE_P (fcode) || fcode == REAL_TYPE))
|
||||||
return 0;
|
return NULL;
|
||||||
conv = build_conv (ck_std, to, conv);
|
conv = build_conv (ck_std, to, conv);
|
||||||
|
|
||||||
/* Give this a better rank if it's a promotion. */
|
/* Give this a better rank if it's a promotion. */
|
||||||
|
@ -2615,7 +2615,7 @@ build_user_type_conversion_1 (tree totype, tree expr, int flags)
|
||||||
|
|
||||||
candidates = splice_viable (candidates, pedantic, &any_viable_p);
|
candidates = splice_viable (candidates, pedantic, &any_viable_p);
|
||||||
if (!any_viable_p)
|
if (!any_viable_p)
|
||||||
return 0;
|
return NULL;
|
||||||
|
|
||||||
cand = tourney (candidates);
|
cand = tourney (candidates);
|
||||||
if (cand == 0)
|
if (cand == 0)
|
||||||
|
@ -6247,7 +6247,7 @@ tourney (struct z_candidate *candidates)
|
||||||
{
|
{
|
||||||
champ = challenger->next;
|
champ = challenger->next;
|
||||||
if (champ == 0)
|
if (champ == 0)
|
||||||
return 0;
|
return NULL;
|
||||||
champ_compared_to_predecessor = 0;
|
champ_compared_to_predecessor = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6270,7 +6270,7 @@ tourney (struct z_candidate *candidates)
|
||||||
{
|
{
|
||||||
fate = joust (champ, challenger, 0);
|
fate = joust (champ, challenger, 0);
|
||||||
if (fate != 1)
|
if (fate != 1)
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return champ;
|
return champ;
|
||||||
|
|
|
@ -1976,7 +1976,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||||
constructs like "typedef struct foo { ... } foo"
|
constructs like "typedef struct foo { ... } foo"
|
||||||
would look like an erroneous redeclaration. */
|
would look like an erroneous redeclaration. */
|
||||||
if (same_type_p (TREE_TYPE (newdecl), TREE_TYPE (olddecl)))
|
if (same_type_p (TREE_TYPE (newdecl), TREE_TYPE (olddecl)))
|
||||||
return 0;
|
return NULL;
|
||||||
else
|
else
|
||||||
return "redefinition of %q#D";
|
return "redefinition of %q#D";
|
||||||
}
|
}
|
||||||
|
@ -1987,7 +1987,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||||
abort()). Don't complain about redefinition in this case. */
|
abort()). Don't complain about redefinition in this case. */
|
||||||
if (DECL_LANG_SPECIFIC (olddecl) && DECL_PURE_VIRTUAL_P (olddecl)
|
if (DECL_LANG_SPECIFIC (olddecl) && DECL_PURE_VIRTUAL_P (olddecl)
|
||||||
&& DECL_INITIAL (olddecl) == NULL_TREE)
|
&& DECL_INITIAL (olddecl) == NULL_TREE)
|
||||||
return 0;
|
return NULL;
|
||||||
|
|
||||||
/* If both functions come from different namespaces, this is not
|
/* If both functions come from different namespaces, this is not
|
||||||
a redeclaration - this is a conflict with a used function. */
|
a redeclaration - this is a conflict with a used function. */
|
||||||
|
@ -2008,7 +2008,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||||
else
|
else
|
||||||
return "redefinition of %q#D";
|
return "redefinition of %q#D";
|
||||||
}
|
}
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
else if (TREE_CODE (newdecl) == TEMPLATE_DECL)
|
else if (TREE_CODE (newdecl) == TEMPLATE_DECL)
|
||||||
{
|
{
|
||||||
|
@ -2055,7 +2055,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||||
/* Objects declared at top level: */
|
/* Objects declared at top level: */
|
||||||
/* If at least one is a reference, it's ok. */
|
/* If at least one is a reference, it's ok. */
|
||||||
if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl))
|
if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl))
|
||||||
return 0;
|
return NULL;
|
||||||
/* Reject two definitions. */
|
/* Reject two definitions. */
|
||||||
return "redefinition of %q#D";
|
return "redefinition of %q#D";
|
||||||
}
|
}
|
||||||
|
@ -2066,7 +2066,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||||
together with an external reference. */
|
together with an external reference. */
|
||||||
if (!(DECL_EXTERNAL (newdecl) && DECL_EXTERNAL (olddecl)))
|
if (!(DECL_EXTERNAL (newdecl) && DECL_EXTERNAL (olddecl)))
|
||||||
return "redeclaration of %q#D";
|
return "redeclaration of %q#D";
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2055,7 +2055,7 @@ language_to_string (enum languages c)
|
||||||
default:
|
default:
|
||||||
gcc_unreachable ();
|
gcc_unreachable ();
|
||||||
}
|
}
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the proper printed version of a parameter to a C++ function. */
|
/* Return the proper printed version of a parameter to a C++ function. */
|
||||||
|
|
Loading…
Reference in New Issue