* c.opt (Wpacked-bitfield-compat): Change init value to -1.
* c-opts.c (c_common_post_options): If -W*packed-bitfield-compat
was not supplied then set warn_packed_bitfield_compat to the
default value of 1.
* stor-layout.c (place_field): Check warn_packed_bitfield_compat
against 1.
From-SVN: r143718
+2009-01-27 Adam Nemet <anemet@caviumnetworks.com>
+
+ * c.opt (Wpacked-bitfield-compat): Change init value to -1.
+ * c-opts.c (c_common_post_options): If -W*packed-bitfield-compat
+ was not supplied then set warn_packed_bitfield_compat to the
+ default value of 1.
+ * stor-layout.c (place_field): Check warn_packed_bitfield_compat
+ against 1.
+
2009-01-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38503
if (warn_sign_conversion == -1)
warn_sign_conversion = (c_dialect_cxx ()) ? 0 : warn_conversion;
+ /* -Wpacked-bitfield-compat is on by default for the C languages. The
+ warning is issued in stor-layout.c which is not part of the front-end so
+ we need to selectively turn it on here. */
+ if (warn_packed_bitfield_compat == -1)
+ warn_packed_bitfield_compat = 1;
/* Special format checking options don't work without -Wformat; warn if
they are used. */
Warn about overriding initializers without side effects
Wpacked-bitfield-compat
-C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(1) Warning
+C ObjC C++ ObjC++ Var(warn_packed_bitfield_compat) Init(-1) Warning
Warn about packed bit-fields whose offset changed in GCC 4.4
Wparentheses
{
if (DECL_PACKED (field))
{
- if (warn_packed_bitfield_compat)
+ if (warn_packed_bitfield_compat == 1)
inform
(input_location,
"Offset of packed bit-field %qD has changed in GCC 4.4",