Commit 8d08fdba by Mike Stump

Initial revision

From-SVN: r6613
parent f8a9e02b
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Variables and structures for overloading rules.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* The following structure is used when comparing various alternatives
for overloading. The unsigned quantity `strikes.i' is used
for fast comparison of two possibilities. This number is an
aggregate of four constituents:
EVIL: if this is non-zero, then the candidate should not be considered
ELLIPSIS: if this is non-zero, then some actual argument has been matched
against an ellipsis
USER: if this is non-zero, then a user-defined type conversion is needed
B_OR_D: if this is non-zero, then use a base pointer instead of the
type of the pointer we started with.
EASY: if this is non-zero, then we have a builtin conversion
(such as int to long, int to float, etc) to do.
If two candidates require user-defined type conversions, and the
type conversions are not identical, then an ambiguity error
is reported.
If two candidates agree on user-defined type conversions,
and one uses pointers of strictly higher type (derived where
another uses base), then that alternative is silently chosen.
If two candidates have a non-monotonic derived/base pointer
relationship, and/or a non-monotonic easy conversion relationship,
then a warning is emitted to show which paths are possible, and
which one is being chosen.
For example:
int i;
double x;
overload f;
int f (int, int);
double f (double, double);
f (i, x); // draws a warning
struct B
{
f (int);
} *bb;
struct D : B
{
f (double);
} *dd;
dd->f (x); // exact match
dd->f (i); // draws warning
Note that this technique really only works for 255 arguments. Perhaps
this is not enough. */
/* These macros and harshness_code are used by the NEW METHOD. */
#define EVIL_CODE (1<<7)
#define CONST_CODE (1<<6)
#define ELLIPSIS_CODE (1<<5)
#define USER_CODE (1<<4)
#define STD_CODE (1<<3)
#define PROMO_CODE (1<<2)
#define QUAL_CODE (1<<1)
#define TRIVIAL_CODE (1<<0)
struct harshness_code
{
/* What kind of conversion is involved. */
unsigned short code;
/* The inheritance distance. */
short distance;
/* For a PROMO_CODE, Any special penalties involved in integral conversions.
This exists because $4.1 of the ARM states that something like
`short unsigned int' should promote to `int', not `unsigned int'.
If, for example, it tries to match two fns, f(int) and f(unsigned),
f(int) should be a better match than f(unsigned) by this rule. Without
this extra metric, they both only appear as "integral promotions", which
will lead to an ambiguity.
For a TRIVIAL_CODE, This is also used by build_overload_call_real and
convert_harshness to keep track of other information we need. */
unsigned short int_penalty;
};
struct candidate
{
/* OLD METHOD */
unsigned char evil; /* !0 if this will never convert. */
unsigned char ellipsis; /* !0 if a match against an ellipsis occurred */
unsigned char user; /* !0 if at least one user-defined type conv. */
unsigned short b_or_d; /* count number of derived->base or
base->derived conv. */
unsigned short easy; /* count number of builtin type conv. */
/* NEW METHOD */
struct harshness_code h; /* Used for single-argument conversions. */
int h_len; /* The length of the harshness vector. */
/* Both methods. */
tree function; /* A FUNCTION_DECL */
tree basetypes; /* The path to function. */
tree arg; /* first parm to function. */
/* This union is only here while we maintain both the old and new
argument matching schemes. When it goes away, all v.ansi_harshness
references will be just `harshness'. */
union
{
/* Indexed by argument number, encodes evil, user, d_to_b, and easy
strikes for that argument. At end of array, we store the index+1
of where we started using default parameters, or 0 if there are
none. */
struct harshness_code *ansi_harshness; /* NEW METHOD */
unsigned short *old_harshness; /* OLD METHOD */
} v;
union
{
tree field; /* If no evil strikes, the FUNCTION_DECL of
the function (if a member function). */
int bad_arg; /* the index of the first bad argument:
0 if no bad arguments
> 0 is first bad argument
-1 if extra actual arguments
-2 if too few actual arguments.
-3 if const/non const method mismatch.
-4 if type unification failed.
-5 if contravariance violation. */
} u;
};
int rank_for_overload ();
/* Variables shared between cp-class.c and cp-call.c. */
extern int n_vtables;
extern int n_vtable_entries;
extern int n_vtable_searches;
extern int n_vtable_elems;
extern int n_convert_harshness;
extern int n_compute_conversion_costs;
extern int n_build_method_call;
extern int n_inner_fields_searched;
/* This file contains the definitions and documentation for the
additional tree codes used in the GNU C++ compiler (see tree.def
for the standard codes).
Copyright (C) 1987, 1988, 1990, 1993 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Reference to the contents of an offset
(a value whose type is an OFFSET_TYPE).
Operand 0 is the object within which the offset is taken.
Operand 1 is the offset. The language independent OFFSET_REF
just won't work for us. */
DEFTREECODE (CP_OFFSET_REF, "cp_offset_ref", "r", 2)
/* For DELETE_EXPR, operand 0 is the store to be destroyed.
Operand 1 is the value to pass to the destroying function
saying whether the store should be deallocated as well. */
DEFTREECODE (DELETE_EXPR, "dl_expr", "e", 2)
/* Value is reference to particular overloaded class method.
Operand 0 is the class name (an IDENTIFIER_NODE);
operand 1 is the field (also an IDENTIFIER_NODE).
The COMPLEXITY field holds the class level (usually 0). */
DEFTREECODE (SCOPE_REF, "scope_ref", "r", 2)
/* When composing an object with a member, this is the result.
Operand 0 is the object. Operand 1 is the member (usually
a dereferenced pointer to member). */
DEFTREECODE (MEMBER_REF, "member_ref", "r", 2)
/* Type conversion operator in C++. TREE_TYPE is type that this
operator converts to. Operand is expression to be converted. */
DEFTREECODE (TYPE_EXPR, "type_expr", "e", 1)
/* For CPLUS_NEW_EXPR, operand 0 is function which performs initialization,
operand 1 is argument list to initialization function,
and operand 2 is the slot which was allocated for this expression. */
DEFTREECODE (NEW_EXPR, "nw_expr", "e", 3)
/* Distinguish variables that are only used to identify exceptions
that were caught. Only the DECL_NAME (and TREE_CHAIN)
is really used. */
DEFTREECODE (CPLUS_CATCH_DECL, "catch_decl", "d", 0)
/* Template definition. The following fields have the specified uses,
although there are other macros in cp-tree.h that should be used for
accessing this data.
DECL_ARGUMENTS template parm vector
DECL_TEMPLATE_INFO template text &c
DECL_VINDEX list of instantiations already produced;
only done for functions so far
For class template:
DECL_INITIAL associated templates (methods &c)
DECL_RESULT null
For non-class templates:
TREE_TYPE type of object to be constructed
DECL_RESULT decl for object to be created
(e.g., FUNCTION_DECL with tmpl parms used)
*/
DEFTREECODE (TEMPLATE_DECL, "template_decl", "d", 0)
/* Index into a template parameter list. This parameter must be a type.
Use TYPE_FIELDS to find parmlist and index. */
DEFTREECODE (TEMPLATE_TYPE_PARM, "template_type_parm", "t", 0)
/* Index into a template parameter list. This parameter must not be a
type. */
DEFTREECODE (TEMPLATE_CONST_PARM, "template_const_parm", "c", 2)
/* For uninstantiated parameterized types.
TYPE_VALUES tree list:
TREE_PURPOSE template decl
TREE_VALUE parm vector
TREE_CHAIN null
Other useful fields to be defined later. */
DEFTREECODE (UNINSTANTIATED_P_TYPE, "uninstantiated_p_type", "t", 0)
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Variables and structures for declaration processing.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* In grokdeclarator, distinguish syntactic contexts of declarators. */
enum decl_context
{ NORMAL, /* Ordinary declaration */
FUNCDEF, /* Function definition */
PARM, /* Declaration of parm before function body */
FIELD, /* Declaration inside struct or union */
BITFIELD, /* Likewise but with specified width */
TYPENAME, /* Typename (inside cast or sizeof) */
MEMFUNCDEF /* Member function definition */
};
/* C++: Keep these around to reduce calls to `get_identifier'.
Identifiers for `this' in member functions and the auto-delete
parameter for destructors. */
extern tree this_identifier, in_charge_identifier;
/* Parsing a function declarator leaves a list of parameter names
or a chain or parameter decls here. */
extern tree last_function_parms;
/* A list of static class variables. This is needed, because a
static class variable can be declared inside the class without
an initializer, and then initialized, staticly, outside the class. */
extern tree pending_statics;
/* A list of objects which have constructors or destructors
which reside in the global scope. The decl is stored in
the TREE_VALUE slot and the initializer is stored
in the TREE_PURPOSE slot. */
extern tree static_aggregates;
/* A list of functions which were declared inline, but later had their
address taken. Used only for non-virtual member functions, since we can
find other functions easily enough. */
extern tree pending_addressable_inlines;
#ifdef DEBUG_CP_BINDING_LEVELS
/* Purely for debugging purposes. */
extern int debug_bindings_indentation;
#endif
This diff is collapsed. Click to expand it.
/* Provide a call-back mechanism for handling error output.
Copyright (C) 1993 Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "tree.h"
#include <ctype.h>
/* cp_printer is the type of a function which converts an argument into
a string for digestion by printf. The cp_printer function should deal
with all memory management; the functions in this file will not free
the char*s returned. See cp-error.c for an example use of this code. */
typedef char* cp_printer PROTO((HOST_WIDE_INT, int));
extern cp_printer * cp_printers[256];
typedef void errorfn (); /* deliberately vague */
extern char* cp_file_of PROTO((tree));
extern int cp_line_of PROTO((tree));
#define STRDUP(f) (ap = (char *) alloca (strlen (f) +1), strcpy (ap, (f)), ap)
#define NARGS 3
#define arglist a1, a2, a3
#define arglist_dcl HOST_WIDE_INT a1, a2, a3;
#define ARGSINIT args[0] = a1; args[1] = a2; args[2] = a3;
#define ARGSLIST args[0], args[1], args[2]
static void
cp_thing (errfn, atarg1, format, arglist)
errorfn *errfn;
int atarg1;
char *format;
arglist_dcl
{
char *fmt;
char *f;
char *ap;
int arg;
HOST_WIDE_INT atarg = atarg1 ? a1 : 0;
HOST_WIDE_INT args[NARGS];
ARGSINIT
fmt = STRDUP(format);
for (f = fmt, arg = 0; *f; ++f)
{
cp_printer * function;
int alternate;
int maybe_here;
/* ignore text */
if (*f != '%') continue;
++f;
alternate = 0;
maybe_here = 0;
/* ignore most flags */
while (*f == ' ' || *f == '-' || *f == '+' || *f == '#')
{
if (*f == '+')
maybe_here = 1;
else if (*f == '#')
alternate = 1;
++f;
}
/* ignore field width */
if (*f == '*')
{
++f;
++arg;
}
else
while (isdigit (*f))
++f;
/* ignore precision */
if (*f == '.')
{
++f;
if (*f == '*')
{
++f;
++arg;
}
else
while (isdigit (*f))
++f;
}
/* ignore "long" */
if (*f == 'l')
++f;
function = cp_printers[*f];
if (function)
{
char *p;
if (arg >= NARGS) abort ();
if (maybe_here && atarg)
atarg = args[arg];
/* Must use a temporary to avoid calling *function twice */
p = (*function) (args[arg], alternate);
args[arg] = (HOST_WIDE_INT) STRDUP(p);
*f = 's';
}
++arg; /* Assume valid format string */
}
if (atarg)
{
char *file = cp_file_of ((tree) atarg);
int line = cp_line_of ((tree) atarg);
(*errfn) (file, line, fmt, ARGSLIST);
}
else
(*errfn) (fmt, ARGSLIST);
}
void
cp_error (format, arglist)
char *format;
arglist_dcl
{
extern errorfn error;
cp_thing (error, 0, format, arglist);
}
void
cp_warning (format, arglist)
char *format;
arglist_dcl
{
extern errorfn warning;
cp_thing (warning, 0, format, arglist);
}
void
cp_pedwarn (format, arglist)
char *format;
arglist_dcl
{
extern errorfn pedwarn;
cp_thing (pedwarn, 0, format, arglist);
}
void
cp_compiler_error (format, arglist)
char *format;
arglist_dcl
{
extern errorfn compiler_error;
cp_thing (compiler_error, 0, format, arglist);
}
void
cp_sprintf (format, arglist)
char *format;
arglist_dcl
{
extern errorfn sprintf;
cp_thing (sprintf, 0, format, arglist);
}
void
cp_error_at (format, arglist)
char *format;
arglist_dcl
{
extern errorfn error_with_file_and_line;
cp_thing (error_with_file_and_line, 1, format, arglist);
}
void
cp_warning_at (format, arglist)
char *format;
arglist_dcl
{
extern errorfn warning_with_file_and_line;
cp_thing (warning_with_file_and_line, 1, format, arglist);
}
void
cp_pedwarn_at (format, arglist)
char *format;
arglist_dcl
{
extern errorfn pedwarn_with_file_and_line;
cp_thing (pedwarn_with_file_and_line, 1, format, arglist);
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
/* Convert language-specific tree expression to rtl instructions,
for GNU compiler.
Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "rtl.h"
#include "tree.h"
#include "flags.h"
#include "expr.h"
#include "cp-tree.h"
#undef NULL
#define NULL 0
/* Hook used by expand_expr to expand language-specific tree codes. */
rtx
cplus_expand_expr (exp, target, tmode, modifier)
tree exp;
rtx target;
enum machine_mode tmode;
enum expand_modifier modifier;
{
tree type = TREE_TYPE (exp);
register enum machine_mode mode = TYPE_MODE (type);
register enum tree_code code = TREE_CODE (exp);
rtx original_target = target;
int ignore = target == const0_rtx;
if (ignore)
target = 0, original_target = 0;
/* No sense saving up arithmetic to be done
if it's all in the wrong mode to form part of an address.
And force_operand won't know whether to sign-extend or zero-extend. */
if (mode != Pmode && modifier == EXPAND_SUM)
modifier = EXPAND_NORMAL;
switch (code)
{
case NEW_EXPR:
{
/* Something needs to be initialized, but we didn't know
where that thing was when building the tree. For example,
it could be the return value of a function, or a parameter
to a function which lays down in the stack, or a temporary
variable which must be passed by reference.
Cleanups are handled in a language-specific way: they
might be run by the called function (true in GNU C++
for parameters with cleanups), or they might be
run by the caller, after the call (true in GNU C++
for other cleanup needs). */
tree func = TREE_OPERAND (exp, 0);
tree args = TREE_OPERAND (exp, 1);
tree type = TREE_TYPE (exp), slot;
tree fn_type = TREE_TYPE (TREE_TYPE (func));
tree return_type = TREE_TYPE (fn_type);
tree call_exp;
rtx call_target, return_target;
int pcc_struct_return = 0;
/* The expression `init' wants to initialize what
`target' represents. SLOT holds the slot for TARGET. */
slot = TREE_OPERAND (exp, 2);
if (target == 0)
{
/* Should always be called with a target in BLKmode case. */
my_friendly_assert (mode != BLKmode, 205);
my_friendly_assert (DECL_RTL (slot) != 0, 206);
target = gen_reg_rtx (mode);
}
/* The target the initializer will initialize (CALL_TARGET)
must now be directed to initialize the target we are
supposed to initialize (TARGET). The semantics for
choosing what CALL_TARGET is is language-specific,
as is building the call which will perform the
initialization. It is left here to show the choices that
exist for C++. */
if (TREE_CODE (func) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (func, 0)) == FUNCTION_DECL
&& DECL_CONSTRUCTOR_P (TREE_OPERAND (func, 0)))
{
type = TYPE_POINTER_TO (type);
/* Don't clobber a value that might be part of a default
parameter value. */
if (TREE_PERMANENT (args))
args = tree_cons (0, build1 (ADDR_EXPR, type, slot),
TREE_CHAIN (args));
else
TREE_VALUE (args) = build1 (ADDR_EXPR, type, slot);
call_target = 0;
}
else if (TREE_CODE (return_type) == REFERENCE_TYPE)
{
type = return_type;
call_target = 0;
}
else
{
#ifdef PCC_STATIC_STRUCT_RETURN
pcc_struct_return = 1;
call_target = 0;
#else
call_target = target;
#endif
}
if (call_target)
{
preserve_temp_slots (call_target);
/* Make this a valid memory address now. The code below assumes
that it can compare rtx and make assumptions based on the
result. The assumptions are true only if the address was
valid to begin with. */
call_target = validize_mem (call_target);
}
preserve_temp_slots (DECL_RTL (slot));
call_exp = build (CALL_EXPR, type, func, args, 0);
TREE_SIDE_EFFECTS (call_exp) = 1;
return_target = expand_expr (call_exp, call_target, mode, 0);
free_temp_slots ();
if (call_target == 0)
{
if (pcc_struct_return)
{
tree init = build (RTL_EXPR, type, 0, return_target);
TREE_ADDRESSABLE (init) = 1;
expand_aggr_init (slot, init, 0);
if (TYPE_NEEDS_DESTRUCTOR (type))
{
init = build (RTL_EXPR, build_reference_type (type), 0,
XEXP (return_target, 0));
init = maybe_build_cleanup (convert_from_reference (init));
if (init != NULL_TREE)
expand_expr (init, 0, 0, 0);
}
call_target = return_target = DECL_RTL (slot);
}
else
call_target = return_target;
}
if (call_target != return_target)
{
my_friendly_assert (! TYPE_NEEDS_CONSTRUCTING (type), 317);
if (GET_MODE (return_target) == BLKmode)
emit_block_move (call_target, return_target, expr_size (exp),
TYPE_ALIGN (type) / BITS_PER_UNIT);
else
emit_move_insn (call_target, return_target);
}
if (TREE_CODE (return_type) == REFERENCE_TYPE)
{
tree init;
if (GET_CODE (call_target) == REG
&& REGNO (call_target) < FIRST_PSEUDO_REGISTER)
my_friendly_abort (39);
type = TREE_TYPE (exp);
init = build (RTL_EXPR, return_type, 0, call_target);
/* We got back a reference to the type we want. Now initialize
target with that. */
expand_aggr_init (slot, init, 0);
}
if (DECL_RTL (slot) != target)
emit_move_insn (DECL_RTL (slot), target);
return DECL_RTL (slot);
}
case OFFSET_REF:
{
#if 1
return expand_expr (default_conversion (resolve_offset_ref (exp)),
target, tmode, EXPAND_NORMAL);
#else
/* This is old crusty code, and does not handle all that the
resolve_offset_ref function does. (mrs) */
tree base = build_unary_op (ADDR_EXPR, TREE_OPERAND (exp, 0), 0);
tree offset = build_unary_op (ADDR_EXPR, TREE_OPERAND (exp, 1), 0);
return expand_expr (build (PLUS_EXPR, TREE_TYPE (exp), base, offset),
target, tmode, EXPAND_NORMAL);
#endif
}
default:
break;
}
my_friendly_abort (40);
/* NOTREACHED */
return NULL;
}
void
init_cplus_expand ()
{
lang_expand_expr = cplus_expand_expr;
}
/* If DECL had its rtl moved from where callers expect it
to be, fix it up. RESULT is the nominal rtl for the RESULT_DECL,
which may be a pseudo instead of a hard register. */
void
fixup_result_decl (decl, result)
tree decl;
rtx result;
{
if (REG_P (result))
{
if (REGNO (result) >= FIRST_PSEUDO_REGISTER)
{
rtx real_decl_result;
#ifdef FUNCTION_OUTGOING_VALUE
real_decl_result
= FUNCTION_OUTGOING_VALUE (TREE_TYPE (decl), current_function_decl);
#else
real_decl_result
= FUNCTION_VALUE (TREE_TYPE (decl), current_function_decl);
#endif
REG_FUNCTION_VALUE_P (real_decl_result) = 1;
result = real_decl_result;
}
emit_move_insn (result, DECL_RTL (decl));
emit_insn (gen_rtx (USE, VOIDmode, result));
}
}
/* Return nonzero iff DECL is memory-based. The DECL_RTL of
certain const variables might be a CONST_INT, or a REG
in some cases. We cannot use `memory_operand' as a test
here because on most RISC machines, a variable's address
is not, by itself, a legitimate address. */
int
decl_in_memory_p (decl)
tree decl;
{
return DECL_RTL (decl) != 0 && GET_CODE (DECL_RTL (decl)) == MEM;
}
%{
/* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */
%}
struct resword { char *name; short token; enum rid rid;};
%%
__alignof, ALIGNOF, NORID
__alignof__, ALIGNOF, NORID
__asm, GCC_ASM_KEYWORD, NORID
__asm__, GCC_ASM_KEYWORD, NORID
__attribute, ATTRIBUTE, NORID
__attribute__, ATTRIBUTE, NORID
__classof, CLASSOF, NORID
__classof__, CLASSOF, NORID
__const, TYPE_QUAL, RID_CONST
__const__, TYPE_QUAL, RID_CONST
__extension__, EXTENSION, NORID
__headof, HEADOF, NORID
__headof__, HEADOF, NORID
__inline, SCSPEC, RID_INLINE
__inline__, SCSPEC, RID_INLINE
__label__, LABEL, NORID
__signed, TYPESPEC, RID_SIGNED
__signed__, TYPESPEC, RID_SIGNED
__typeof, TYPEOF, NORID
__typeof__, TYPEOF, NORID
__volatile, TYPE_QUAL, RID_VOLATILE
__volatile__, TYPE_QUAL, RID_VOLATILE
__wchar_t, TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,
all, ALL, NORID /* Extension */,
except, EXCEPT, NORID /* Extension */,
exception, AGGR, RID_EXCEPTION /* Extension */,
raise, RAISE, NORID /* Extension */,
raises, RAISES, NORID /* Extension */,
reraise, RERAISE, NORID /* Extension */,
throw, THROW, NORID /* Extension */,
try, TRY, NORID /* Extension */,
asm, ASM_KEYWORD, NORID,
auto, SCSPEC, RID_AUTO,
break, BREAK, NORID,
case, CASE, NORID,
catch, CATCH, NORID,
char, TYPESPEC, RID_CHAR,
class, AGGR, RID_CLASS,
classof, CLASSOF, NORID,
const, TYPE_QUAL, RID_CONST,
continue, CONTINUE, NORID,
default, DEFAULT, NORID,
delete, DELETE, NORID,
do, DO, NORID,
double, TYPESPEC, RID_DOUBLE,
dynamic_cast, DYNAMIC_CAST, NORID,
else, ELSE, NORID,
enum, ENUM, NORID,
extern, SCSPEC, RID_EXTERN,
float, TYPESPEC, RID_FLOAT,
for, FOR, NORID,
friend, SCSPEC, RID_FRIEND,
goto, GOTO, NORID,
headof, HEADOF, NORID,
if, IF, NORID,
inline, SCSPEC, RID_INLINE,
int, TYPESPEC, RID_INT,
long, TYPESPEC, RID_LONG,
mutable, SCSPEC, RID_MUTABLE,
new, NEW, NORID,
operator, OPERATOR, NORID,
overload, OVERLOAD, NORID,
private, VISSPEC, RID_PRIVATE,
protected, VISSPEC, RID_PROTECTED,
public, VISSPEC, RID_PUBLIC,
register, SCSPEC, RID_REGISTER,
return, RETURN, NORID,
short, TYPESPEC, RID_SHORT,
signature, AGGR, RID_SIGNATURE /* Extension */,
signed, TYPESPEC, RID_SIGNED,
sigof, SIGOF, NORID /* Extension */,
sizeof, SIZEOF, NORID,
static, SCSPEC, RID_STATIC,
struct, AGGR, RID_RECORD,
switch, SWITCH, NORID,
this, THIS, NORID,
template, TEMPLATE, NORID,
typedef, SCSPEC, RID_TYPEDEF,
typeof, TYPEOF, NORID,
typeid, TYPEID, NORID,
union, AGGR, RID_UNION,
unsigned, TYPESPEC, RID_UNSIGNED,
virtual, SCSPEC, RID_VIRTUAL,
void, TYPESPEC, RID_VOID,
volatile, TYPE_QUAL, RID_VOLATILE,
while, WHILE, NORID,
/* C code produced by gperf version 2.5 (GNU C++ version) */
/* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ../../../devo/gcc/cp/gxx.gperf */
/* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */
struct resword { char *name; short token; enum rid rid;};
#define TOTAL_KEYWORDS 86
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 13
#define MIN_HASH_VALUE 4
#define MAX_HASH_VALUE 196
/* maximum key range = 193, duplicates = 0 */
#ifdef __GNUC__
inline
#endif
static unsigned int
hash (str, len)
register char *str;
register int unsigned len;
{
static unsigned char asso_values[] =
{
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
197, 197, 197, 197, 197, 0, 197, 93, 3, 35,
3, 0, 71, 8, 4, 78, 197, 3, 30, 6,
29, 18, 37, 197, 55, 0, 4, 11, 7, 20,
0, 8, 197, 197, 197, 197, 197, 197,
};
register int hval = len;
switch (hval)
{
default:
case 7:
hval += asso_values[str[6]];
case 6:
case 5:
case 4:
hval += asso_values[str[3]];
case 3:
case 2:
case 1:
hval += asso_values[str[0]];
}
return hval + asso_values[str[len - 1]];
}
#ifdef __GNUC__
inline
#endif
struct resword *
is_reserved_word (str, len)
register char *str;
register unsigned int len;
{
static struct resword wordlist[] =
{
{"",}, {"",}, {"",}, {"",},
{"else", ELSE, NORID,},
{"",}, {"",},
{"__asm__", GCC_ASM_KEYWORD, NORID},
{"this", THIS, NORID,},
{"delete", DELETE, NORID,},
{"except", EXCEPT, NORID /* Extension */,},
{"__asm", GCC_ASM_KEYWORD, NORID},
{"double", TYPESPEC, RID_DOUBLE,},
{"typeid", TYPEID, NORID,},
{"switch", SWITCH, NORID,},
{"try", TRY, NORID /* Extension */,},
{"enum", ENUM, NORID,},
{"void", TYPESPEC, RID_VOID,},
{"",}, {"",}, {"",},
{"struct", AGGR, RID_RECORD,},
{"",},
{"do", DO, NORID,},
{"",}, {"",}, {"",}, {"",},
{"__headof__", HEADOF, NORID},
{"",}, {"",},
{"__const__", TYPE_QUAL, RID_CONST},
{"__volatile", TYPE_QUAL, RID_VOLATILE},
{"__const", TYPE_QUAL, RID_CONST},
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
{"extern", SCSPEC, RID_EXTERN,},
{"__typeof__", TYPEOF, NORID},
{"",},
{"signed", TYPESPEC, RID_SIGNED,},
{"case", CASE, NORID,},
{"class", AGGR, RID_CLASS,},
{"__classof__", CLASSOF, NORID},
{"__extension__", EXTENSION, NORID},
{"",},
{"const", TYPE_QUAL, RID_CONST,},
{"static", SCSPEC, RID_STATIC,},
{"",},
{"throw", THROW, NORID /* Extension */,},
{"goto", GOTO, NORID,},
{"signature", AGGR, RID_SIGNATURE /* Extension */,},
{"long", TYPESPEC, RID_LONG,},
{"private", VISSPEC, RID_PRIVATE,},
{"new", NEW, NORID,},
{"template", TEMPLATE, NORID,},
{"",},
{"while", WHILE, NORID,},
{"",},
{"protected", VISSPEC, RID_PROTECTED,},
{"continue", CONTINUE, NORID,},
{"",},
{"raise", RAISE, NORID /* Extension */,},
{"raises", RAISES, NORID /* Extension */,},
{"",},
{"union", AGGR, RID_UNION,},
{"short", TYPESPEC, RID_SHORT,},
{"",},
{"__inline", SCSPEC, RID_INLINE},
{"",},
{"__inline__", SCSPEC, RID_INLINE},
{"",},
{"__alignof__", ALIGNOF, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"sizeof", SIZEOF, NORID,},
{"virtual", SCSPEC, RID_VIRTUAL,},
{"catch", CATCH, NORID,},
{"friend", SCSPEC, RID_FRIEND,},
{"typeof", TYPEOF, NORID,},
{"",}, {"",},
{"headof", HEADOF, NORID,},
{"int", TYPESPEC, RID_INT,},
{"",}, {"",},
{"__signed__", TYPESPEC, RID_SIGNED},
{"__signed", TYPESPEC, RID_SIGNED},
{"",}, {"",}, {"",},
{"__attribute", ATTRIBUTE, NORID},
{"sigof", SIGOF, NORID /* Extension */,},
{"__attribute__", ATTRIBUTE, NORID},
{"",},
{"__headof", HEADOF, NORID},
{"",}, {"",},
{"unsigned", TYPESPEC, RID_UNSIGNED,},
{"return", RETURN, NORID,},
{"asm", ASM_KEYWORD, NORID,},
{"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,},
{"break", BREAK, NORID,},
{"__typeof", TYPEOF, NORID},
{"mutable", SCSPEC, RID_MUTABLE,},
{"",},
{"public", VISSPEC, RID_PUBLIC,},
{"",},
{"__classof", CLASSOF, NORID},
{"default", DEFAULT, NORID,},
{"",}, {"",}, {"",}, {"",},
{"exception", AGGR, RID_EXCEPTION /* Extension */,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"all", ALL, NORID /* Extension */,},
{"",}, {"",},
{"for", FOR, NORID,},
{"",}, {"",},
{"__label__", LABEL, NORID},
{"auto", SCSPEC, RID_AUTO,},
{"",}, {"",}, {"",}, {"",},
{"volatile", TYPE_QUAL, RID_VOLATILE,},
{"__alignof", ALIGNOF, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"dynamic_cast", DYNAMIC_CAST, NORID,},
{"",},
{"char", TYPESPEC, RID_CHAR,},
{"",},
{"if", IF, NORID,},
{"",},
{"typedef", SCSPEC, RID_TYPEDEF,},
{"operator", OPERATOR, NORID,},
{"reraise", RERAISE, NORID /* Extension */,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"inline", SCSPEC, RID_INLINE,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",},
{"float", TYPESPEC, RID_FLOAT,},
{"",}, {"",}, {"",},
{"overload", OVERLOAD, NORID,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"classof", CLASSOF, NORID,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",},
{"register", SCSPEC, RID_REGISTER,},
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Input handling for G++.
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* G++ needs to do enough saving and re-parsing of text that it is
necessary to abandon the simple FILE* model and use a mechanism where
we can pre-empt one input stream with another derived from saved text;
we may need to do this arbitrarily often, and cannot depend on having
the GNU library available, so FILE objects just don't cut it.
This file is written as a separate module, but can be included by
cp-lex.c for very minor efficiency gains (primarily in function
inlining). */
#include <stdio.h>
#include "obstack.h"
extern FILE *finput;
struct pending_input *save_pending_input ();
void restore_pending_input ();
struct input_source {
/* saved string */
char *str;
int length;
/* current position, when reading as input */
int offset;
/* obstack to free this input string from when finished, if any */
struct obstack *obstack;
/* linked list maintenance */
struct input_source *next;
/* values to restore after reading all of current string */
char *filename;
int lineno;
struct pending_input *input;
int putback_char;
};
static struct input_source *input, *free_inputs;
extern char *input_filename;
extern int lineno;
#ifdef __GNUC__
#define inline __inline__
#else
#define inline
#endif
static inline struct input_source *
allocate_input ()
{
struct input_source *inp;
if (free_inputs)
{
inp = free_inputs;
free_inputs = inp->next;
inp->next = 0;
return inp;
}
inp = (struct input_source *) xmalloc (sizeof (struct input_source));
inp->next = 0;
inp->obstack = 0;
return inp;
}
static inline void
free_input (inp)
struct input_source *inp;
{
if (inp->obstack)
obstack_free (inp->obstack, inp->str);
inp->obstack = 0;
inp->str = 0;
inp->length = 0;
inp->next = free_inputs;
free_inputs = inp;
}
static int putback_char = -1;
/* Some of these external functions are declared inline in case this file
is included in cp-lex.c. */
inline
void
feed_input (str, len, delete)
char *str;
int len;
struct obstack *delete;
{
struct input_source *inp = allocate_input ();
/* This shouldn't be necessary. */
while (len && !str[len-1])
len--;
inp->str = str;
inp->length = len;
inp->obstack = delete;
inp->offset = 0;
inp->next = input;
inp->filename = input_filename;
inp->lineno = lineno;
inp->input = save_pending_input ();
inp->putback_char = putback_char;
putback_char = -1;
input = inp;
}
struct pending_input *to_be_restored; /* XXX */
extern int end_of_file;
int
getch ()
{
if (putback_char != -1)
{
int ch = putback_char;
putback_char = -1;
return ch;
}
if (input)
{
if (input->offset == input->length)
{
struct input_source *inp = input;
my_friendly_assert (putback_char == -1, 223);
to_be_restored = inp->input;
input->offset++;
return EOF;
}
else if (input->offset > input->length)
{
struct input_source *inp = input;
end_of_file = 0;
input = inp->next;
input_filename = inp->filename;
lineno = inp->lineno;
/* Get interface/implementation back in sync. */
extract_interface_info ();
putback_char = inp->putback_char;
free_input (inp);
return getch ();
}
if (input)
return input->str[input->offset++];
}
return getc (finput);
}
inline
void
put_back (ch)
int ch;
{
my_friendly_assert (putback_char == -1, 224);
putback_char = ch;
}
inline
int
input_redirected ()
{
return input != 0;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Define constants and variables for communication with cp-parse.y.
Copyright (C) 1987, 1992, 1993 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
and by Brendan Kehoe (brendan@cygnus.com).
This file is part of GNU CC.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY. No author or distributor
accepts responsibility to anyone for the consequences of using it
or for whether it serves any particular purpose or works at all,
unless he says so in writing. Refer to the GNU CC General Public
License for full details.
Everyone is granted permission to copy, modify and redistribute
GNU CC, but only under the conditions described in the
GNU CC General Public License. A copy of this license is
supposed to have been given to you along with GNU CC so you
can know your rights and responsibilities. It should be in a
file named COPYING. Among other things, the copyright notice
and this notice must be preserved on all copies. */
enum rid
{
RID_UNUSED,
RID_INT,
RID_CHAR,
RID_WCHAR,
RID_FLOAT,
RID_DOUBLE,
RID_VOID,
/* C++ extension */
RID_CLASS,
RID_RECORD,
RID_UNION,
RID_ENUM,
RID_LONGLONG,
/* This is where grokdeclarator starts its search when setting the specbits.
The first seven are in the order of most frequently used, as found
building libg++. */
RID_EXTERN,
RID_CONST,
RID_LONG,
RID_TYPEDEF,
RID_UNSIGNED,
RID_SHORT,
RID_INLINE,
RID_STATIC,
RID_REGISTER,
RID_VOLATILE,
RID_FRIEND,
RID_VIRTUAL,
RID_PUBLIC,
RID_PRIVATE,
RID_PROTECTED,
RID_SIGNED,
RID_EXCEPTION,
RID_RAISES,
RID_AUTO,
RID_MUTABLE,
RID_SIGNATURE,
/* Before adding enough to get up to 64, the RIDBIT_* macros
will have to be changed a little. */
RID_MAX
};
#define NORID RID_UNUSED
#define RID_FIRST_MODIFIER RID_EXTERN
/* The type that can represent all values of RIDBIT. */
/* We assume that we can stick in at least 32 bits into this. */
typedef struct { unsigned long idata[2]; }
RID_BIT_TYPE;
/* Be careful, all these modify N twice. */
#define RIDBIT_SETP(N, V) (((unsigned long)1 << (int) ((N)%32)) \
& (V).idata[(N)/32])
#define RIDBIT_NOTSETP(NN, VV) (! RIDBIT_SETP (NN, VV))
#define RIDBIT_SET(N, V) do { \
(V).idata[(N)/32] \
|= ((unsigned long)1 << (int) ((N)%32)); \
} while (0)
#define RIDBIT_RESET(N, V) do { \
(V).idata[(N)/32] \
&= ~((unsigned long)1 << (int) ((N)%32)); \
} while (0)
#define RIDBIT_RESET_ALL(V) do { \
(V).idata[0] = 0; \
(V).idata[1] = 0; \
} while (0)
#define RIDBIT_ANY_SET(V) ((V).idata[0] || (V).idata[1])
/* The elements of `ridpointers' are identifier nodes
for the reserved type names and storage classes.
It is indexed by a RID_... value. */
extern tree ridpointers[(int) RID_MAX];
/* the declaration found for the last IDENTIFIER token read in.
yylex must look this up to detect typedefs, which get token type TYPENAME,
so it is left around in case the identifier is not a typedef but is
used in a context which makes it a reference to a variable. */
extern tree lastiddecl;
extern char *token_buffer; /* Pointer to token buffer. */
/* Back-door communication channel to the lexer. */
extern int looking_for_typename;
/* Pending language change.
Positive is push count, negative is pop count. */
extern int pending_lang_change;
extern tree make_pointer_declarator (), make_reference_declarator ();
extern void reinit_parse_for_function ();
extern void reinit_parse_for_method ();
extern int yylex ();
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
/* Prints out trees in human readable form.
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "tree.h"
#include <stdio.h>
#include "cp-tree.h"
void
print_lang_decl (file, node, indent)
FILE *file;
tree node;
int indent;
{
if (!DECL_LANG_SPECIFIC (node))
return;
/* A FIELD_DECL only has the flags structure, which we aren't displaying
anyways. */
if (DECL_MUTABLE_P (node))
{
indent_to (file, indent + 3);
fprintf (file, " mutable ");
}
if (TREE_CODE (node) == FIELD_DECL)
return;
indent_to (file, indent + 3);
if (DECL_MAIN_VARIANT (node))
{
fprintf (file, " decl-main-variant ");
fprintf (file, HOST_PTR_PRINTF, DECL_MAIN_VARIANT (node));
}
if (DECL_PENDING_INLINE_INFO (node))
{
fprintf (file, " pending-inline-info ");
fprintf (file, HOST_PTR_PRINTF, DECL_PENDING_INLINE_INFO (node));
}
if (DECL_TEMPLATE_INFO (node))
{
fprintf (file, " template-info ");
fprintf (file, HOST_PTR_PRINTF, DECL_TEMPLATE_INFO (node));
}
}
void
print_lang_type (file, node, indent)
FILE *file;
register tree node;
int indent;
{
if (TREE_CODE (node) == TEMPLATE_TYPE_PARM)
{
print_node (file, "tinfo", TYPE_VALUES (node), indent + 4);
return;
}
if (TREE_CODE (node) == UNINSTANTIATED_P_TYPE)
{
print_node (file, "template", UPT_TEMPLATE (node), indent + 4);
print_node (file, "parameters", UPT_PARMS (node), indent + 4);
return;
}
if (! (TREE_CODE (node) == RECORD_TYPE
|| TREE_CODE (node) == UNION_TYPE))
return;
if (!TYPE_LANG_SPECIFIC (node))
return;
indent_to (file, indent + 3);
if (TYPE_NEEDS_CONSTRUCTING (node))
fputs ( "needs-constructor", file);
if (TYPE_NEEDS_DESTRUCTOR (node))
fputs (" needs-destructor", file);
if (TYPE_HAS_DESTRUCTOR (node))
fputs (" ~X()", file);
if (TYPE_HAS_DEFAULT_CONSTRUCTOR (node))
fputs (" X()", file);
if (TYPE_HAS_CONVERSION (node))
fputs (" has-type-conversion", file);
if (TYPE_HAS_INT_CONVERSION (node))
fputs (" has-int-conversion", file);
if (TYPE_HAS_REAL_CONVERSION (node))
fputs (" has-float-conversion", file);
if (TYPE_HAS_INIT_REF (node))
{
if (TYPE_HAS_CONST_INIT_REF (node))
fputs (" X(constX&)", file);
else
fputs (" X(X&)", file);
}
if (TREE_GETS_NEW (node))
fputs (" gets-new", file);
if (TREE_GETS_DELETE (node))
fputs (" gets-delete", file);
if (TYPE_HAS_ASSIGNMENT (node))
fputs (" has=", file);
if (TYPE_HAS_ASSIGN_REF (node))
fputs (" this=(X&)", file);
if (TYPE_OVERLOADS_METHOD_CALL_EXPR (node))
fputs (" op->()", file);
if (TYPE_GETS_INIT_AGGR (node))
fputs (" gets X(X, ...)", file);
if (TYPE_OVERLOADS_CALL_EXPR (node))
fputs (" op()", file);
if (TYPE_OVERLOADS_ARRAY_REF (node))
fputs (" op[]", file);
if (TYPE_OVERLOADS_ARROW (node))
fputs (" op->", file);
if (TYPE_USES_MULTIPLE_INHERITANCE (node))
fputs (" uses-multiple-inheritance", file);
if (TREE_CODE (node) == RECORD_TYPE)
{
fprintf (file, " n_parents %d n_ancestors %d",
CLASSTYPE_N_BASECLASSES (node),
CLASSTYPE_N_SUPERCLASSES (node));
fprintf (file, " use_template=%d", CLASSTYPE_USE_TEMPLATE (node));
if (CLASSTYPE_INTERFACE_ONLY (node))
fprintf (file, " interface-only");
if (CLASSTYPE_INTERFACE_UNKNOWN (node))
fprintf (file, " interface-unknown");
print_node (file, "member-functions", CLASSTYPE_METHOD_VEC (node),
indent + 4);
print_node (file, "baselinks",
TYPE_BINFO_BASETYPES (node) ? CLASSTYPE_BASELINK_VEC (node) : NULL_TREE,
indent + 4);
}
}
void
print_lang_identifier (file, node, indent)
FILE *file;
tree node;
int indent;
{
print_node (file, "global", IDENTIFIER_GLOBAL_VALUE (node), indent + 4);
print_node (file, "class", IDENTIFIER_CLASS_VALUE (node), indent + 4);
print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4);
print_node (file, "label", IDENTIFIER_LABEL_VALUE (node), indent + 4);
print_node (file, "template", IDENTIFIER_TEMPLATE (node), indent + 4);
print_node (file, "implicit", IDENTIFIER_IMPLICIT_DECL (node), indent + 4);
print_node (file, "error locus", IDENTIFIER_ERROR_LOCUS (node), indent + 4);
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
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