diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-06 18:53:01 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-06 18:53:01 +0000 |
commit | 6685d11ca873e7e78314597a48e934e13946b5af (patch) | |
tree | d1e15bd8204f3a756aa9a12600b3781957a80f71 /gcc/c/c-decl.c | |
parent | 5afc8ab4f70d7ba13ff57a8e99c1b570bbf7ad3c (diff) | |
download | gcc-6685d11ca873e7e78314597a48e934e13946b5af.tar.gz |
PR c/57773
* doc/implement-c.texi: Mention that other integer types are
permitted as bit-field types in strictly conforming mode.
c/
* c-decl.c (check_bitfield_type_and_width): Warn for implementation
defined bit-field types only in ISO C.
testsuite/
* gcc.dg/pr57773.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206373 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 21a07e211fe..6d4e6a36dea 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4840,7 +4840,8 @@ check_bitfield_type_and_width (tree *type, tree *width, tree orig_name) if (!in_system_header_at (input_location) && type_mv != integer_type_node && type_mv != unsigned_type_node - && type_mv != boolean_type_node) + && type_mv != boolean_type_node + && !flag_isoc99) pedwarn (input_location, OPT_Wpedantic, "type of bit-field %qs is a GCC extension", name); |