diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-03-27 01:26:18 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-03-26 20:26:18 -0500 |
commit | 17aec3eb3b5042c4386627faa6a0384505454943 (patch) | |
tree | c6019b3d538ef251492309184ce35cc036ed6ae6 /gcc/stor-layout.c | |
parent | b06775f990ad9fdc378388df18bbebf7d03ef9e3 (diff) | |
download | gcc-17aec3eb3b5042c4386627faa6a0384505454943.zip gcc-17aec3eb3b5042c4386627faa6a0384505454943.tar.gz gcc-17aec3eb3b5042c4386627faa6a0384505454943.tar.bz2 |
c-convert.c (convert): Return if output or input type is ERROR_MARK.
* c-convert.c (convert): Return if output or input type is ERROR_MARK.
* c-decl.c (duplicate_decls): Only look at DECL_BUILT_IN_NONANSI
and DECL_INLINE if FUNCTION_DECL.
(pushdecl, redeclaration_error_message): Likewise, for DECL_INLINE.
(store_parm_decls): Check for type of PARM_DECL being ERROR_MARK.
Use DECL_WEAK, not DECL_RESULT, to flag for already seen.
(combine_parm_decls): Likewise.
* ggc-common.c (gcc_mark_tree_children, case 'd'): Use DECL_RESULT_FLD.
* print-tree.c (print_node): Likewise.
Only test DECL_PACKED, DECL_INLINE, DECL_BIT_FIELD, and
DECL_TRANSPARENT_UNION on proper decl types.
Properly handly DECL_INCOMING_RTL and DECL_SAVED_INSNS.
* stor-layout.c (layout_decl): Only check DECL_PACKED and
DECL_BIT_FIELD of FIELD_DECL.
* tree.h (DECL_RESULT_FLD): New macro.
* cp/class.c (check_field_decl): Fix typo.
(build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
(check_methods): Likewise.
(check_field_decls): Likewise.
Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
* cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
Use DECL_RESULT_FLD, not DECL_RESULT.
* cp/decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
* cp/lex.c (identifier_type): Likewise.
* cp/pt.c (determine_specialization, lookup_template_class): Likewise.
(tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
(resolve_overloaded_unification, more_specialized): Likewise.
* cp/semantics.c (finish_member_declaration): Likewise.
* cp/typeck.c (build_x_function_call): Likewise.
From-SVN: r32759
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 58ab3f5..7621e61 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -324,9 +324,10 @@ layout_decl (decl, known_align) /* Force alignment required for the data type. But if the decl itself wants greater alignment, don't override that. Likewise, if the decl is packed, don't override it. */ - if (!(code == FIELD_DECL && DECL_BIT_FIELD (decl)) + if (! (code == FIELD_DECL && DECL_BIT_FIELD (decl)) && (DECL_ALIGN (decl) == 0 - || (! DECL_PACKED (decl) && TYPE_ALIGN (type) > DECL_ALIGN (decl)))) + || (! (code == FIELD_DECL && DECL_PACKED (decl)) + && TYPE_ALIGN (type) > DECL_ALIGN (decl)))) DECL_ALIGN (decl) = TYPE_ALIGN (type); /* For fields, set the bit field type and update the alignment. */ @@ -342,7 +343,7 @@ layout_decl (decl, known_align) /* See if we can use an ordinary integer mode for a bit-field. Conditions are: a fixed size that is correct for another mode and occupying a complete byte or bytes on proper boundary. */ - if (DECL_BIT_FIELD (decl) + if (code == FIELD_DECL && DECL_BIT_FIELD (decl) && TYPE_SIZE (type) != 0 && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT) @@ -360,7 +361,7 @@ layout_decl (decl, known_align) } /* Turn off DECL_BIT_FIELD if we won't need it set. */ - if (DECL_BIT_FIELD (decl) + if (code == FIELD_DECL && DECL_BIT_FIELD (decl) && TYPE_MODE (type) == BLKmode && DECL_MODE (decl) == BLKmode && known_align > TYPE_ALIGN (type) && DECL_ALIGN (decl) >= TYPE_ALIGN (type) @@ -376,7 +377,7 @@ layout_decl (decl, known_align) /* If requested, warn about definitions of large data objects. */ if (warn_larger_than - && (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL) + && (code == VAR_DECL || code == PARM_DECL) && ! DECL_EXTERNAL (decl)) { tree size = DECL_SIZE_UNIT (decl); |