memtemp77.C (main): Adjust comparison against.
testsuite/ * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparison against. __PRETTY_FUNCTION__ cp/ * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace TS_* flags with corresponding TFF_*. Adjust prototypes of functions (which used to take a tree_string_flags) to take an int. * cp-tree.h (enum tree_string_flags): Remove (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. (type_as_string, decl_as_string, expr_as_string, context_as_string): Adjust prototype. * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER instead of TS_PLAIN. * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of plain `0'. From-SVN: r37152
This commit is contained in:
parent
34791641f6
commit
761f08559a
7 changed files with 235 additions and 235 deletions
|
@ -1,3 +1,26 @@
|
|||
2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
|
||||
|
||||
* error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
|
||||
TS_* flags with corresponding TFF_*. Adjust prototypes of
|
||||
functions (which used to take a tree_string_flags) to take an int.
|
||||
|
||||
* cp-tree.h (enum tree_string_flags): Remove
|
||||
(TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
|
||||
TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
|
||||
TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
|
||||
TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
|
||||
TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
|
||||
TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
|
||||
(type_as_string, decl_as_string, expr_as_string,
|
||||
context_as_string): Adjust prototype.
|
||||
|
||||
* class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
|
||||
instead of TS_PLAIN.
|
||||
|
||||
* pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
|
||||
instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
|
||||
plain `0'.
|
||||
|
||||
2000-10-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
|
||||
|
|
|
@ -6665,7 +6665,7 @@ dump_class_hierarchy_r (t, binfo, indent)
|
|||
|
||||
fprintf (stderr, "%*s0x%lx (%s) ", indent, "",
|
||||
(unsigned long) binfo,
|
||||
type_as_string (binfo, TS_PLAIN));
|
||||
type_as_string (binfo, TFF_PLAIN_IDENTIFIER));
|
||||
fprintf (stderr, HOST_WIDE_INT_PRINT_DEC,
|
||||
tree_low_cst (BINFO_OFFSET (binfo), 0));
|
||||
if (TREE_VIA_VIRTUAL (binfo))
|
||||
|
|
|
@ -3674,29 +3674,42 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG };
|
|||
#define TEMPLATE_TYPE_DECL(NODE) \
|
||||
(TEMPLATE_PARM_DECL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
|
||||
|
||||
/* Control stringification of trees (types, decls & exprs).
|
||||
Bit or them together. */
|
||||
enum tree_string_flags
|
||||
{
|
||||
TS_PLAIN, /* nothing special */
|
||||
TS_CHASE_TYPEDEFS = 1 << 0, /* look through typedefs */
|
||||
TS_DECORATE = 1 << 1, /* decorate things */
|
||||
TS_FUNC_NORETURN = 1 << 2, /* inhibit function return type */
|
||||
TS_FUNC_THROW = 1 << 3, /* show throw spec */
|
||||
TS_PARM_DEFAULTS = 1 << 4, /* show parm defaults */
|
||||
TS_EXPR_PARENS = 1 << 5, /* enclose in parens */
|
||||
TS_AGGR_TAGS = 1 << 6, /* show struct tags */
|
||||
TS_DECL_TYPE = 1 << 7, /* show decl's type */
|
||||
TS_FUNC_SCOPE = 1 << 8, /* show function scope */
|
||||
TS_PEDANTIC_NAME = 1 << 9, /* pedantically name things */
|
||||
TS_TEMPLATE_PREFIX= 1 << 10, /* show template <parms> prefix */
|
||||
/* These constants can used as bit flags in the process of tree formatting.
|
||||
|
||||
/* Internal use flags */
|
||||
TS_TEMPLATE_PARM = 1 << 11, /* decl is really a non-type template parm */
|
||||
TS_TEMPLATE_PLAIN = 1 << 12, /* don't decorate primary template_name */
|
||||
TFF_PLAIN_IDENTIFIER: unqualified part of a name.
|
||||
TFF_NAMESPACE_SCOPE: the complete qualified-id form of a name.
|
||||
TFF_CLASS_SCOPE: if possible, include the class-name part of a
|
||||
qualified-id. This flag may be implied in some circumstances by
|
||||
TFF_NAMESPACE_SCOPE.
|
||||
TFF_SCOPE: the combinaison of the two above.
|
||||
TFF_CHASE_TYPEDEF: print the original type-id instead of the typedef-name.
|
||||
TFF_DECL_SPECIFIERS: print decl-specifiers.
|
||||
TFF_CLASS_KEY_OR_ENUM: precede a class-type name (resp. enum name) with
|
||||
a class-key (resp. `enum').
|
||||
TFF_RETURN_TYPE: include function return type.
|
||||
TFF_FUNCTION_DEFAULT_ARGUMENTS: include function default parameter values.
|
||||
TFF_EXCEPTION_SPECIFICATION: show function exception specification.
|
||||
TFF_TEMPLATE_HEADER: show the template<...> hearder in a
|
||||
template-declaration.
|
||||
TFF_TEMPLATE_DEFAULT_ARGUMENTS: show template paramter default values.
|
||||
TFF_TEMPLATE_NAME: show only template-name.
|
||||
TFF_EXPR_IN_PARENS: Parenthesize expressions. */
|
||||
|
||||
TS_NEXT_BIT = 13 /* next available bit */
|
||||
};
|
||||
#define TFF_PLAIN_IDENTIFIER (0)
|
||||
#define TFF_NAMESPACE_SCOPE (1)
|
||||
#define TFF_CLASS_SCOPE (1 << 1)
|
||||
#define TFF_CHASE_NAMESPACE_ALIAS (1 << 2)
|
||||
#define TFF_CHASE_TYPEDEF (1 << 3)
|
||||
#define TFF_DECL_SPECIFIERS (1 << 4)
|
||||
#define TFF_CLASS_KEY_OR_ENUM (1 << 5)
|
||||
#define TFF_RETURN_TYPE (1 << 6)
|
||||
#define TFF_FUNCTION_DEFAULT_ARGUMENTS (1 << 7)
|
||||
#define TFF_EXCEPTION_SPECIFICATION (1 << 8)
|
||||
#define TFF_TEMPLATE_HEADER (1 << 9)
|
||||
#define TFF_TEMPLATE_DEFAULT_ARGUMENTS (1 << 10)
|
||||
#define TFF_TEMPLATE_NAME (1 << 11)
|
||||
#define TFF_EXPR_IN_PARENS (1 << 12)
|
||||
#define TFF_SCOPE (TFF_NAMESPACE_SCOPE | TFF_CLASS_SCOPE)
|
||||
|
||||
/* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM
|
||||
node. */
|
||||
|
@ -4032,10 +4045,10 @@ extern void cp_deprecated PARAMS ((const char*));
|
|||
|
||||
/* in error.c */
|
||||
extern void init_error PARAMS ((void));
|
||||
extern const char *type_as_string PARAMS ((tree, enum tree_string_flags));
|
||||
extern const char *decl_as_string PARAMS ((tree, enum tree_string_flags));
|
||||
extern const char *expr_as_string PARAMS ((tree, enum tree_string_flags));
|
||||
extern const char *context_as_string PARAMS ((tree, enum tree_string_flags));
|
||||
extern const char *type_as_string PARAMS ((tree, int));
|
||||
extern const char *decl_as_string PARAMS ((tree, int));
|
||||
extern const char *expr_as_string PARAMS ((tree, int));
|
||||
extern const char *context_as_string PARAMS ((tree, int));
|
||||
extern const char *lang_decl_name PARAMS ((tree, int));
|
||||
extern const char *cp_file_of PARAMS ((tree));
|
||||
extern int cp_line_of PARAMS ((tree));
|
||||
|
|
367
gcc/cp/error.c
367
gcc/cp/error.c
File diff suppressed because it is too large
Load diff
|
@ -3534,7 +3534,7 @@ mangle_class_name_for_template (name, parms, arglist)
|
|||
|
||||
if (TREE_CODE (parm) == TYPE_DECL)
|
||||
{
|
||||
cat (type_as_string (arg, TS_CHASE_TYPEDEFS));
|
||||
cat (type_as_string (arg, TFF_CHASE_TYPEDEF));
|
||||
continue;
|
||||
}
|
||||
else if (TREE_CODE (parm) == TEMPLATE_DECL)
|
||||
|
@ -3551,14 +3551,14 @@ mangle_class_name_for_template (name, parms, arglist)
|
|||
my_friendly_assert (TREE_CODE (context) == NAMESPACE_DECL
|
||||
|| CLASS_TYPE_P (context),
|
||||
980422);
|
||||
cat(decl_as_string (DECL_CONTEXT (arg), 0));
|
||||
cat(decl_as_string (DECL_CONTEXT (arg), TFF_PLAIN_IDENTIFIER));
|
||||
cat("::");
|
||||
}
|
||||
cat (IDENTIFIER_POINTER (DECL_NAME (arg)));
|
||||
}
|
||||
else
|
||||
/* Output the parameter declaration */
|
||||
cat (type_as_string (arg, TS_CHASE_TYPEDEFS));
|
||||
cat (type_as_string (arg, TFF_CHASE_TYPEDEF));
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
@ -3573,7 +3573,7 @@ mangle_class_name_for_template (name, parms, arglist)
|
|||
}
|
||||
/* No need to check arglist against parmlist here; we did that
|
||||
in coerce_template_parms, called from lookup_template_class. */
|
||||
cat (expr_as_string (arg, 0));
|
||||
cat (expr_as_string (arg, TFF_PLAIN_IDENTIFIER));
|
||||
}
|
||||
{
|
||||
char *bufp = obstack_next_free (&scratch_obstack);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
|
||||
|
||||
* g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparison against.
|
||||
__PRETTY_FUNCTION__
|
||||
|
||||
2000-10-29 Neil Booth <neilb@earthling.net>
|
||||
|
||||
* gcc.dg/cpp/defined.c, include1.c, paste11.c, skipping.c:
|
||||
|
|
|
@ -18,7 +18,7 @@ const char* S3<char>::h(int) { return __PRETTY_FUNCTION__; }
|
|||
int main()
|
||||
{
|
||||
if (strcmp (S3<double>::h(7),
|
||||
"const char* S3<T>::h(U) [with U = int, T = double]") == 0)
|
||||
"static const char* S3<T>::h(U) [with U = int, T = double]") == 0)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue