Commit e681c5a1 by Richard Stallman

Add some braces for clarity.

From-SVN: r3414
parent 98e4b835
......@@ -3310,11 +3310,13 @@ finish_decl (decl, init, asmspec_tree)
if ((DECL_EXTERNAL (decl) || TREE_STATIC (decl))
&& DECL_SIZE (decl) != 0)
{
if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
constant_expression_warning (DECL_SIZE (decl));
else
error_with_decl (decl, "storage size of `%s' isn't constant");
}
}
/* Output the assembler code and/or RTL code for variables and functions,
unless the type is an undefined structure or union.
......@@ -4901,6 +4903,7 @@ finish_struct (t, fieldlist)
if (DECL_INITIAL (x))
STRIP_NOPS (DECL_INITIAL (x));
if (DECL_INITIAL (x))
{
if (TREE_CODE (DECL_INITIAL (x)) == INTEGER_CST)
constant_expression_warning (DECL_INITIAL (x));
else
......@@ -4908,6 +4911,7 @@ finish_struct (t, fieldlist)
error_with_decl (x, "bit-field `%s' width not an integer constant");
DECL_INITIAL (x) = NULL;
}
}
/* Detect invalid bit-field type. */
if (DECL_INITIAL (x)
......@@ -5316,6 +5320,7 @@ build_enumerator (name, value)
STRIP_TYPE_NOPS (value);
if (value != 0)
{
if (TREE_CODE (value) == INTEGER_CST)
constant_expression_warning (value);
else
......@@ -5324,6 +5329,7 @@ build_enumerator (name, value)
IDENTIFIER_POINTER (name));
value = 0;
}
}
/* Default based on previous value. */
/* It should no longer be possible to have NON_LVALUE_EXPR
......
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