/* List of VAR_DECLS saved from a previous for statement.
These would be dead in ANSI-conforming code, but might
- be referenced in traditional code. */
+ be referenced in ARM-era code. */
tree dead_vars_from_for;
/* 1 for the level that holds the parameters of a function.
unsigned namespace_p : 1;
/* True if this level is that of a for-statement where we need to
- worry about ambiguous (traditional or ANSI) scope rules. */
+ worry about ambiguous (ARM or ANSI) scope rules. */
unsigned is_for_scope : 1;
/* Two bits left for this word. */
newdecl = 1;
d = build_decl (TYPE_DECL, name, type);
SET_DECL_ARTIFICIAL (d);
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- {
- /* Mark the TYPE_DECL node we created just above as an
- gratuitous one. We need to do this so that dwarfout.c
- will understand that it is not supposed to output a
- TAG_typedef DIE for it. */
- DECL_IGNORED_P (d) = 1;
- }
-#endif /* DWARF_DEBUGGING_INFO */
set_identifier_type_value_with_scope (name, type, b);
}
else
newdecl = 1;
d = build_decl (TYPE_DECL, name, type);
SET_DECL_ARTIFICIAL (d);
-#ifdef DWARF_DEBUGGING_INFO
- if (write_symbols == DWARF_DEBUG)
- {
- /* Mark the TYPE_DECL node we created just above as an
- gratuitous one. We need to do this so that dwarfout.c
- will understand that it is not supposed to output a
- TAG_typedef DIE for it. */
- DECL_IGNORED_P (d) = 1;
- }
-#endif /* DWARF_DEBUGGING_INFO */
-
TYPE_MAIN_DECL (type) = d;
DECL_CONTEXT (d) = context;
if (! globalize && processing_template_decl && IS_AGGR_TYPE (type))
Note that this does not apply to the C++ case of declaring
a variable `extern const' and then later `const'.
- Don't complain if -traditional, since traditional compilers
- don't complain.
-
Don't complain about built-in functions, since they are beyond
the user's control. */
static char *implicit_extern_static_warning
= "`%D' was declared implicitly `extern' and later `static'";
- if (flag_traditional
- || TREE_CODE (newdecl) == TYPE_DECL)
+ if (TREE_CODE (newdecl) == TYPE_DECL)
return;
name = DECL_ASSEMBLER_NAME (newdecl);
&& TREE_CODE (TREE_TYPE (olddecl)) == ERROR_MARK))
types_match = 1;
- if (flag_traditional && TREE_CODE (newdecl) == FUNCTION_DECL
- && IDENTIFIER_IMPLICIT_DECL (DECL_ASSEMBLER_NAME (newdecl)) == olddecl)
- /* If -traditional, avoid error for redeclaring fcn
- after implicit decl. */
- ;
- else if (TREE_CODE (olddecl) == FUNCTION_DECL
- && DECL_ARTIFICIAL (olddecl)
- && (DECL_BUILT_IN (olddecl) || DECL_BUILT_IN_NONANSI (olddecl)))
+ if (TREE_CODE (olddecl) == FUNCTION_DECL
+ && DECL_ARTIFICIAL (olddecl)
+ && (DECL_BUILT_IN (olddecl) || DECL_BUILT_IN_NONANSI (olddecl)))
{
/* If you declare a built-in or predefined function name as static,
the old definition is overridden, but optionally warn this was a
obstack_free (&permanent_obstack, newdecl);
}
- else if (LANG_DECL_PERMANENT (ol))
+ else if (LANG_DECL_PERMANENT (ol) && ol != nl)
{
if (DECL_MAIN_VARIANT (olddecl) == olddecl)
{
/* Save these lang_decls that would otherwise be lost. */
extern tree free_lang_decl_chain;
tree free_lang_decl = (tree) ol;
+
+ if (DECL_LANG_SPECIFIC (olddecl) == ol)
+ abort ();
+
TREE_CHAIN (free_lang_decl) = free_lang_decl_chain;
free_lang_decl_chain = free_lang_decl;
}
}
}
- /* In PCC-compatibility mode, extern decls of vars with no current decl
- take effect at top level no matter where they are. */
- if (flag_traditional && DECL_EXTERNAL (x)
- && lookup_name (name, 0) == NULL_TREE)
- b = global_binding_level;
-
/* This name is new in its binding level.
Install the new declaration and return it. */
if (b == global_binding_level)
/* Save the decl permanently so we can warn if definition follows.
In ANSI C, warn_implicit is usually false, so the saves little space.
But in C++, it's usually true, hence the extra code. */
- if (temp && (flag_traditional || !warn_implicit || toplevel_bindings_p ()))
+ if (temp && (! warn_implicit || toplevel_bindings_p ()))
end_temporary_allocation ();
/* We used to reuse an old implicit decl here,
TREE_PUBLIC (decl) = 1;
/* ANSI standard says implicit declarations are in the innermost block.
- So we record the decl in the standard fashion.
- If flag_traditional is set, pushdecl does it top-level. */
+ So we record the decl in the standard fashion. */
pushdecl (decl);
rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
tree decl;
register tree endlink, int_endlink, double_endlink;
tree fields[20];
- /* Either char* or void*. */
- tree traditional_ptr_type_node;
/* Data type of memcpy. */
tree memcpy_ftype, strlen_ftype;
int wchar_type_size;
record_builtin_type (RID_MAX, "unsigned short", short_unsigned_type_node);
/* `unsigned long' is the standard type for sizeof.
- Traditionally, use a signed type.
Note that stddef.h uses `unsigned long',
and this must agree, even of long and int are the same size. */
sizetype
= TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (SIZE_TYPE)));
- if (flag_traditional && TREE_UNSIGNED (sizetype))
- sizetype = signed_type (sizetype);
ptrdiff_type_node
= TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (get_identifier (PTRDIFF_TYPE)));
tree_cons (NULL_TREE, const_string_type_node,
endlink));
- traditional_ptr_type_node
- = (flag_traditional ? string_type_node : ptr_type_node);
-
memcpy_ftype /* memcpy prototype */
- = build_function_type (traditional_ptr_type_node,
+ = build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, const_ptr_type_node,
tree_cons (NULL_TREE,
/* ??? FIXME: What about nested classes? */
int toplev = toplevel_bindings_p () || pseudo_global_level_p ();
int was_temp
- = ((flag_traditional
- || (TREE_STATIC (decl) && TYPE_NEEDS_DESTRUCTOR (type)))
+ = (TREE_STATIC (decl) && TYPE_NEEDS_DESTRUCTOR (type)
&& allocation_temporary_p ());
if (was_temp)
/* Check to see if the same name is already bound at
the outer level, either because it was directly declared,
or because a dead for-decl got preserved. In either case,
- the code would not have been valid under the traditional
+ the code would not have been valid under the ARM
scope rules, so clear is_for_scope for the
current_binding_level.
else if (decl_context == BITFIELD)
bitfield = 1, decl_context = FIELD;
- if (flag_traditional && allocation_temporary_p ())
- end_temporary_allocation ();
-
/* Look inside a declarator for the name being declared
and get it as a string, for an error message. */
{
/* Decide whether an integer type is signed or not.
Optionally treat bitfields as signed by default. */
if (RIDBIT_SETP (RID_UNSIGNED, specbits)
- /* Traditionally, all bitfields are unsigned. */
- || (bitfield && flag_traditional)
|| (bitfield && ! flag_signed_bitfields
&& (explicit_int || explicit_char
/* A typedef for plain `int' without `signed'
name);
}
- /* Traditionally, declaring return type float means double. */
-
- if (flag_traditional
- && TYPE_MAIN_VARIANT (type) == float_type_node)
- {
- type = build_type_variant (double_type_node,
- TYPE_READONLY (type),
- TYPE_VOLATILE (type));
- }
-
/* Construct the function type and go to the next
inner layer of declarator. */
}
}
- /* ANSI seems to say that `const int foo ();'
+ /* ANSI says that `const int foo ();'
does not make the function foo const. */
- type = build_function_type (type,
- flag_traditional ? 0 : arg_types);
+ type = build_function_type (type, arg_types);
}
break;
/* Must mark the RESULT_DECL as being in this function. */
DECL_CONTEXT (DECL_RESULT (fndecl)) = fndecl;
- /* Obey `register' declarations if `setjmp' is called in this fn. */
- if (flag_traditional && current_function_calls_setjmp)
- setjmp_protect (DECL_INITIAL (fndecl));
-
/* Set the BLOCK_SUPERCONTEXT of the outermost function scope to point
to the FUNCTION_DECL node itself. */
BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
DECL_INITIAL (fndecl) = error_mark_node;
/* And we need the arguments for template instantiation. */
if (! processing_template_decl)
- {
- if (! DECL_CONSTRUCTOR_P (fndecl)
- || !(TYPE_USES_VIRTUAL_BASECLASSES
- (TYPE_METHOD_BASETYPE (fntype))))
- DECL_ARGUMENTS (fndecl) = NULL_TREE;
- }
+ DECL_ARGUMENTS (fndecl) = NULL_TREE;
}
if (DECL_STATIC_CONSTRUCTOR (fndecl))
/* 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 98
+#define TOTAL_KEYWORDS 97
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 16
#define MIN_HASH_VALUE 4
-#define MAX_HASH_VALUE 258
-/* maximum key range = 255, duplicates = 0 */
+#define MAX_HASH_VALUE 202
+/* maximum key range = 199, duplicates = 0 */
#ifdef __GNUC__
inline
register char *str;
register int unsigned len;
{
- static unsigned short asso_values[] =
+ static unsigned char asso_values[] =
{
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 259, 0, 259, 27, 17, 20,
- 40, 0, 64, 6, 10, 89, 259, 2, 110, 44,
- 13, 107, 40, 10, 18, 55, 1, 3, 5, 17,
- 2, 4, 259, 259, 259, 259, 259, 259,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 0, 203, 29, 22, 32,
+ 35, 0, 73, 8, 19, 48, 203, 0, 7, 15,
+ 11, 66, 9, 11, 19, 58, 1, 7, 83, 21,
+ 89, 5, 203, 203, 203, 203, 203, 203,
};
register int hval = len;
{"",}, {"",}, {"",}, {"",},
{"else", ELSE, NORID,},
{"true", CXX_TRUE, NORID,},
- {"",}, {"",},
+ {"",}, {"",}, {"",},
{"try", TRY, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",}, {"",}, {"",}, {"",}, {"",},
{"not", '!', NORID,},
- {"xor_eq", ASSIGN, NORID,},
+ {"",},
{"extern", SCSPEC, RID_EXTERN,},
+ {"",},
+ {"template", TEMPLATE, RID_TEMPLATE,},
+ {"__null", CONSTANT, RID_NULL},
{"",}, {"",}, {"",},
- {"xor", '^', NORID,},
- {"case", CASE, NORID,},
+ {"typename", TYPENAME_KEYWORD, NORID,},
{"",}, {"",},
- {"using", USING, NORID,},
- {"__extension__", EXTENSION, NORID},
+ {"long", TYPESPEC, RID_LONG,},
{"not_eq", EQCOMPARE, NORID,},
- {"",}, {"",},
- {"continue", CONTINUE, NORID,},
- {"new", NEW, NORID,},
+ {"__alignof__", ALIGNOF, NORID},
{"__inline", SCSPEC, RID_INLINE},
- {"",},
+ {"using", USING, NORID,},
{"__inline__", SCSPEC, RID_INLINE},
+ {"while", WHILE, NORID,},
+ {"enum", ENUM, NORID,},
+ {"new", NEW, NORID,},
+ {"case", CASE, NORID,},
{"",}, {"",}, {"",},
- {"return", RETURN, NORID,},
- {"",}, {"",},
- {"and_eq", ASSIGN, NORID,},
- {"",}, {"",},
+ {"bool", TYPESPEC, RID_BOOL,},
{"delete", DELETE, NORID,},
{"typeid", TYPEID, NORID,},
- {"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,},
- {"namespace", NAMESPACE, NORID,},
- {"template", TEMPLATE, RID_TEMPLATE,},
- {"break", BREAK, NORID,},
- {"private", VISSPEC, RID_PRIVATE,},
- {"typename", TYPENAME_KEYWORD, NORID,},
- {"",},
- {"catch", CATCH, NORID,},
- {"",}, {"",}, {"",}, {"",},
- {"char", TYPESPEC, RID_CHAR,},
- {"",},
- {"__asm__", GCC_ASM_KEYWORD, NORID},
- {"double", TYPESPEC, RID_DOUBLE,},
- {"",},
- {"struct", AGGR, RID_RECORD,},
- {"reinterpret_cast", REINTERPRET_CAST, NORID,},
- {"",},
- {"static_cast", STATIC_CAST, NORID,},
- {"",},
- {"and", ANDAND, NORID,},
- {"typeof", TYPEOF, NORID,},
- {"switch", SWITCH, NORID,},
+ {"return", RETURN, NORID,},
{"",},
+ {"__label__", LABEL, NORID},
+ {"and_eq", ASSIGN, NORID,},
{"asm", ASM_KEYWORD, NORID,},
- {"",},
- {"default", DEFAULT, NORID,},
+ {"continue", CONTINUE, NORID,},
+ {"namespace", NAMESPACE, NORID,},
{"",},
{"mutable", SCSPEC, RID_MUTABLE,},
- {"short", TYPESPEC, RID_SHORT,},
- {"signature", AGGR, RID_SIGNATURE /* Extension */,},
- {"const", CV_QUALIFIER, RID_CONST,},
- {"static", SCSPEC, RID_STATIC,},
- {"",}, {"",},
- {"for", FOR, NORID,},
- {"",}, {"",}, {"",},
- {"void", TYPESPEC, RID_VOID,},
- {"bitand", '&', NORID,},
- {"protected", VISSPEC, RID_PROTECTED,},
- {"enum", ENUM, NORID,},
{"int", TYPESPEC, RID_INT,},
- {"",}, {"",}, {"",},
- {"float", TYPESPEC, RID_FLOAT,},
+ {"compl", '~', NORID,},
+ {"public", VISSPEC, RID_PUBLIC,},
+ {"protected", VISSPEC, RID_PROTECTED,},
+ {"break", BREAK, NORID,},
{"",},
{"__signed__", TYPESPEC, RID_SIGNED},
- {"dynamic_cast", DYNAMIC_CAST, NORID,},
- {"__attribute", ATTRIBUTE, NORID},
{"",},
+ {"__attribute", ATTRIBUTE, NORID},
+ {"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,},
{"__attribute__", ATTRIBUTE, NORID},
- {"__asm", GCC_ASM_KEYWORD, NORID},
- {"",},
- {"const_cast", CONST_CAST, NORID,},
- {"",}, {"",}, {"",},
- {"friend", SCSPEC, RID_FRIEND,},
+ {"double", TYPESPEC, RID_DOUBLE,},
+ {"explicit", SCSPEC, RID_EXPLICIT,},
+ {"__asm__", GCC_ASM_KEYWORD, NORID},
+ {"reinterpret_cast", REINTERPRET_CAST, NORID,},
+ {"and", ANDAND, NORID,},
{"",}, {"",}, {"",},
- {"signed", TYPESPEC, RID_SIGNED,},
- {"this", THIS, NORID,},
+ {"static_cast", STATIC_CAST, NORID,},
+ {"struct", AGGR, RID_RECORD,},
+ {"default", DEFAULT, NORID,},
+ {"char", TYPESPEC, RID_CHAR,},
{"__const", CV_QUALIFIER, RID_CONST},
{"__const__", CV_QUALIFIER, RID_CONST},
{"__volatile", CV_QUALIFIER, RID_VOLATILE},
- {"__null", CONSTANT, RID_NULL},
+ {"__asm", GCC_ASM_KEYWORD, NORID},
{"__volatile__", CV_QUALIFIER, RID_VOLATILE},
+ {"typeof", TYPEOF, NORID,},
{"__typeof__", TYPEOF, NORID},
{"or_eq", ASSIGN, NORID,},
+ {"short", TYPESPEC, RID_SHORT,},
+ {"switch", SWITCH, NORID,},
+ {"signature", AGGR, RID_SIGNATURE /* Extension */,},
{"",},
- {"false", CXX_FALSE, NORID,},
- {"sizeof", SIZEOF, NORID,},
- {"long", TYPESPEC, RID_LONG,},
{"or", OROR, NORID,},
+ {"catch", CATCH, NORID,},
{"union", AGGR, RID_UNION,},
{"__signature__", AGGR, RID_SIGNATURE /* Extension */,},
+ {"__signed", TYPESPEC, RID_SIGNED},
+ {"bitand", '&', NORID,},
{"throw", THROW, NORID,},
- {"",},
- {"while", WHILE, NORID,},
{"register", SCSPEC, RID_REGISTER,},
- {"__alignof__", ALIGNOF, NORID},
- {"class", AGGR, RID_CLASS,},
- {"typedef", SCSPEC, RID_TYPEDEF,},
- {"__signed", TYPESPEC, RID_SIGNED},
- {"",}, {"",},
+ {"for", FOR, NORID,},
+ {"const", CV_QUALIFIER, RID_CONST,},
+ {"static", SCSPEC, RID_STATIC,},
{"unsigned", TYPESPEC, RID_UNSIGNED,},
- {"",}, {"",}, {"",}, {"",}, {"",},
- {"__label__", LABEL, NORID},
- {"bitor", '|', NORID,},
+ {"private", VISSPEC, RID_PRIVATE,},
+ {"__alignof", ALIGNOF, NORID},
{"",},
+ {"inline", SCSPEC, RID_INLINE,},
{"do", DO, NORID,},
- {"volatile", CV_QUALIFIER, RID_VOLATILE,},
- {"",}, {"",}, {"",}, {"",},
- {"if", IF, NORID,},
+ {"",},
+ {"virtual", SCSPEC, RID_VIRTUAL,},
+ {"xor_eq", ASSIGN, NORID,},
+ {"",},
+ {"float", TYPESPEC, RID_FLOAT,},
+ {"dynamic_cast", DYNAMIC_CAST, NORID,},
+ {"signed", TYPESPEC, RID_SIGNED,},
+ {"xor", '^', NORID,},
+ {"bitor", '|', NORID,},
+ {"__extension__", EXTENSION, NORID},
+ {"friend", SCSPEC, RID_FRIEND,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"__sigof__", SIGOF, NORID /* Extension */,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"this", THIS, NORID,},
+ {"",},
+ {"if", IF, NORID,},
{"",}, {"",}, {"",},
- {"compl", '~', NORID,},
- {"public", VISSPEC, RID_PUBLIC,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"__typeof", TYPEOF, NORID},
- {"inline", SCSPEC, RID_INLINE,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"volatile", CV_QUALIFIER, RID_VOLATILE,},
{"",}, {"",},
- {"__alignof", ALIGNOF, NORID},
- {"",}, {"",}, {"",},
- {"overload", OVERLOAD, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"explicit", SCSPEC, RID_EXPLICIT,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"__sigof__", SIGOF, NORID /* Extension */,},
+ {"",}, {"",},
+ {"const_cast", CONST_CAST, NORID,},
+ {"",}, {"",},
+ {"false", CXX_FALSE, NORID,},
+ {"sizeof", SIZEOF, NORID,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"goto", GOTO, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"sigof", SIGOF, NORID /* Extension */,},
- {"",},
- {"virtual", SCSPEC, RID_VIRTUAL,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"bool", TYPESPEC, RID_BOOL,},
- {"",}, {"",}, {"",},
+ {"__typeof", TYPEOF, NORID},
+ {"class", AGGR, RID_CLASS,},
+ {"typedef", SCSPEC, RID_TYPEDEF,},
+ {"",}, {"",},
+ {"void", TYPESPEC, RID_VOID,},
+ {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"auto", SCSPEC, RID_AUTO,},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",},
{"operator", OPERATOR, NORID,},
+ {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",}, {"",}, {"",}, {"",}, {"",},
+ {"sigof", SIGOF, NORID /* Extension */,},
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)