Commit 1394aabd by Richard Stallman

Renamed TREE_INLINE...

Renamed TREE_INLINE, TREE_NONLOCAL, TREE_REGDECL, TREE_EXTERNAL
to DECL_INLINE, DECL_NONLOCAL, DECL_REGISTER, DECL_EXTERNAL.

From-SVN: r1569
parent a82ad570
...@@ -126,12 +126,12 @@ affix_data_type (type_or_decl) ...@@ -126,12 +126,12 @@ affix_data_type (type_or_decl)
for (;;) for (;;)
{ {
if (!strncmp (p, "volatile", 8)) if (!strncmp (p, "volatile ", 9))
{ {
p += 9; p += 9;
continue; continue;
} }
if (!strncmp (p, "const", 5)) if (!strncmp (p, "const ", 6))
{ {
p += 6; p += 6;
continue; continue;
...@@ -568,7 +568,7 @@ gen_decl (decl, is_func_definition, style) ...@@ -568,7 +568,7 @@ gen_decl (decl, is_func_definition, style)
ret_val = affix_data_type (ret_val); ret_val = affix_data_type (ret_val);
if (TREE_REGDECL (decl)) if (DECL_REGISTER (decl))
ret_val = concat ("register ", ret_val); ret_val = concat ("register ", ret_val);
if (TREE_PUBLIC (decl)) if (TREE_PUBLIC (decl))
ret_val = concat ("extern ", ret_val); ret_val = concat ("extern ", ret_val);
......
...@@ -196,7 +196,7 @@ decl_attributes (decl, attributes) ...@@ -196,7 +196,7 @@ decl_attributes (decl, attributes)
if (TREE_CODE (decl) == FIELD_DECL) if (TREE_CODE (decl) == FIELD_DECL)
DECL_PACKED (decl) = 1; DECL_PACKED (decl) = 1;
/* We can't set DECL_PACKED for a VAR_DECL, because the bit is /* We can't set DECL_PACKED for a VAR_DECL, because the bit is
used for TREE_REGDECL. It wouldn't mean anything anyway. */ used for DECL_REGISTER. It wouldn't mean anything anyway. */
} }
else if (TREE_VALUE (a) != 0 else if (TREE_VALUE (a) != 0
&& TREE_CODE (TREE_VALUE (a)) == TREE_LIST && TREE_CODE (TREE_VALUE (a)) == TREE_LIST
......
...@@ -1200,7 +1200,7 @@ build_array_ref (array, index) ...@@ -1200,7 +1200,7 @@ build_array_ref (array, index)
if (pedantic && !lvalue_p (array)) if (pedantic && !lvalue_p (array))
{ {
if (TREE_REGDECL (array)) if (DECL_REGISTER (array))
pedwarn ("ANSI C forbids subscripting `register' array"); pedwarn ("ANSI C forbids subscripting `register' array");
else else
pedwarn ("ANSI C forbids subscripting non-lvalue array"); pedwarn ("ANSI C forbids subscripting non-lvalue array");
...@@ -1211,7 +1211,7 @@ build_array_ref (array, index) ...@@ -1211,7 +1211,7 @@ build_array_ref (array, index)
tree foo = array; tree foo = array;
while (TREE_CODE (foo) == COMPONENT_REF) while (TREE_CODE (foo) == COMPONENT_REF)
foo = TREE_OPERAND (foo, 0); foo = TREE_OPERAND (foo, 0);
if (TREE_CODE (foo) == VAR_DECL && TREE_REGDECL (foo)) if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo))
pedwarn ("ANSI C forbids subscripting non-lvalue array"); pedwarn ("ANSI C forbids subscripting non-lvalue array");
} }
...@@ -3206,7 +3206,7 @@ convert_sequence (conversions, arg) ...@@ -3206,7 +3206,7 @@ convert_sequence (conversions, arg)
/* Return nonzero if REF is an lvalue valid for this language. /* Return nonzero if REF is an lvalue valid for this language.
Lvalues can be assigned, unless their type has TYPE_READONLY. Lvalues can be assigned, unless their type has TYPE_READONLY.
Lvalues can have their address taken, unless they have TREE_REGDECL. */ Lvalues can have their address taken, unless they have DECL_REGISTER. */
int int
lvalue_p (ref) lvalue_p (ref)
...@@ -3353,8 +3353,8 @@ mark_addressable (exp) ...@@ -3353,8 +3353,8 @@ mark_addressable (exp)
case CONST_DECL: case CONST_DECL:
case PARM_DECL: case PARM_DECL:
case RESULT_DECL: case RESULT_DECL:
if (TREE_REGDECL (x) && !TREE_ADDRESSABLE (x) if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
&& TREE_NONLOCAL (x)) && DECL_NONLOCAL (x))
{ {
if (TREE_PUBLIC (x)) if (TREE_PUBLIC (x))
{ {
...@@ -3365,7 +3365,7 @@ mark_addressable (exp) ...@@ -3365,7 +3365,7 @@ mark_addressable (exp)
pedwarn ("register variable `%s' used in nested function", pedwarn ("register variable `%s' used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x))); IDENTIFIER_POINTER (DECL_NAME (x)));
} }
else if (TREE_REGDECL (x) && !TREE_ADDRESSABLE (x)) else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
{ {
if (TREE_PUBLIC (x)) if (TREE_PUBLIC (x))
{ {
...@@ -4708,7 +4708,19 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat) ...@@ -4708,7 +4708,19 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
" `%s'", ofwhat); " `%s'", ofwhat);
return error_mark_node; return error_mark_node;
} }
inside_init = element; else
{
/* Deal with extra levels of {...}. */
if (TREE_CODE (element) == CONSTRUCTOR
&& TREE_TYPE (element) == 0)
{
error_init (
"initializer for scalar%s requires one element",
" `%s'", ofwhat);
return error_mark_node;
}
inside_init = element;
}
} }
#if 0 /* A non-raw constructor is an actual expression. */ #if 0 /* A non-raw constructor is an actual expression. */
......
...@@ -767,12 +767,12 @@ struct tree_type ...@@ -767,12 +767,12 @@ struct tree_type
/* In a VAR_DECL or FUNCTION_DECL, /* In a VAR_DECL or FUNCTION_DECL,
nonzero means external reference: nonzero means external reference:
do not allocate storage, and refer to a definition elsewhere. */ do not allocate storage, and refer to a definition elsewhere. */
#define TREE_EXTERNAL(NODE) ((NODE)->decl.external_flag) #define DECL_EXTERNAL(NODE) ((NODE)->decl.external_flag)
/* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. /* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'.
In LABEL_DECL nodes, nonzero means that an error message about In LABEL_DECL nodes, nonzero means that an error message about
jumping into such a binding contour has been printed for this label. */ jumping into such a binding contour has been printed for this label. */
#define TREE_REGDECL(NODE) ((NODE)->decl.regdecl_flag) #define DECL_REGISTER(NODE) ((NODE)->decl.regdecl_flag)
/* In a FIELD_DECL, indicates this field should be bit-packed. */ /* In a FIELD_DECL, indicates this field should be bit-packed. */
#define DECL_PACKED(NODE) ((NODE)->decl.regdecl_flag) #define DECL_PACKED(NODE) ((NODE)->decl.regdecl_flag)
...@@ -783,11 +783,11 @@ struct tree_type ...@@ -783,11 +783,11 @@ struct tree_type
Also set in some languages for variables, etc., outside the normal Also set in some languages for variables, etc., outside the normal
lexical scope, such as class instance variables. */ lexical scope, such as class instance variables. */
#define TREE_NONLOCAL(NODE) ((NODE)->decl.nonlocal_flag) #define DECL_NONLOCAL(NODE) ((NODE)->decl.nonlocal_flag)
/* Nonzero in a FUNCTION_DECL means this function can be substituted /* Nonzero in a FUNCTION_DECL means this function can be substituted
where it is called. */ where it is called. */
#define TREE_INLINE(NODE) ((NODE)->decl.inline_flag) #define DECL_INLINE(NODE) ((NODE)->decl.inline_flag)
/* Nonzero in a FUNCTION_DECL means this is a built-in function /* Nonzero in a FUNCTION_DECL means this is a built-in function
that is not specified by ansi C and that users are supposed to be allowed that is not specified by ansi C and that users are supposed to be allowed
......
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