diff options
author | DJ Delorie <dj@redhat.com> | 2005-06-28 15:33:23 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2005-06-28 15:33:23 -0400 |
commit | 3176a0c28f6c38963c5beecdbbd44a91b62fc8eb (patch) | |
tree | 4f329fdddb0353188ddf7618481f6dfb4b14591c /gcc/stor-layout.c | |
parent | cec471db31969b339e4d6a7782ec398f9ccdbf28 (diff) | |
download | gcc-3176a0c28f6c38963c5beecdbbd44a91b62fc8eb.zip gcc-3176a0c28f6c38963c5beecdbbd44a91b62fc8eb.tar.gz gcc-3176a0c28f6c38963c5beecdbbd44a91b62fc8eb.tar.bz2 |
c-decl.c (pop_scope): Move warning control into warning call.
* c-decl.c (pop_scope): Move warning control into warning call.
(diagnose_mismatched_decls): Likewise.
(pushdecl): Likewise.
(start_decl): Likewise.
(grokparms): Likewise.
(start_function): Likewise.
(store_parm_decls_newstyle): Likewise.
(store_parm_decls_oldstyle): Likewise.
(finish_function): Likewise.
(declspecs_add_scspec): Likewise.
* c-format.c (decode_format_attr): Likewise.
(maybe_read_dollar_number): Likewise.
(avoid_dollar_number): Likewise.
(finish_dollar_format_checking): Likewise.
(check_format_info): Likewise.
(check_format_info_main): Likewise.
(check_format_types): Likewise.
(format_type_warning): Likewise.
* c-typeck.c (function_types_compatible_p): Likewise.
(build_array_ref): Likewise.
(convert_arguments): Likewise.
(build_c_cast): Likewise.
(store_init_value): Likewise.
(process_init_element): Likewise.
(c_start_case): Likewise.
* stor-layout.c (finalize_record_size): Likewise.
* tree-cfg.c (execute_warn_function_noreturn): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
From-SVN: r101384
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 8065f96..50228b7 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1266,9 +1266,9 @@ finalize_record_size (record_layout_info rli) TYPE_SIZE_UNIT (rli->t) = round_up (unpadded_size_unit, TYPE_ALIGN_UNIT (rli->t)); - if (warn_padded && TREE_CONSTANT (unpadded_size) + if (TREE_CONSTANT (unpadded_size) && simple_cst_equal (unpadded_size, TYPE_SIZE (rli->t)) == 0) - warning (0, "padding struct size to alignment boundary"); + warning (OPT_Wpadded, "padding struct size to alignment boundary"); if (warn_packed && TREE_CODE (rli->t) == RECORD_TYPE && TYPE_PACKED (rli->t) && ! rli->packed_maybe_necessary @@ -1298,19 +1298,19 @@ finalize_record_size (record_layout_info rli) name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (rli->t))); if (STRICT_ALIGNMENT) - warning (OPT_Wattributes, "packed attribute causes inefficient " + warning (OPT_Wpacked, "packed attribute causes inefficient " "alignment for %qs", name); else - warning (OPT_Wattributes, + warning (OPT_Wpacked, "packed attribute is unnecessary for %qs", name); } else { if (STRICT_ALIGNMENT) - warning (OPT_Wattributes, + warning (OPT_Wpacked, "packed attribute causes inefficient alignment"); else - warning (OPT_Wattributes, "packed attribute is unnecessary"); + warning (OPT_Wpacked, "packed attribute is unnecessary"); } } } |