This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][testsuite] Fix oversized bitfield warning.


On 01/14/15 03:54, Matthew Wahab wrote:
Hello,

Test case g++.dg/torture/20141013.C (added
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01190.html) triggers the
warning
--
   20141013.C:45:23: warning: width of 'tree_base::code' exceeds its type
--
on arm-none-eabi.

The code specifies a bitfield of size 16 with an enum as the underlying
type. On arm-none-eabi, enums are packed by default (-fshort-enums) so
the bitfield is oversized and the warning is correct.

This patch adds -fno-short-enums to the compiler options for the test case.

Testing: Ran g++.dg/torture/dg-torture.exp for arm-none-eabi and
arm-none-linux-gnueabihf.

Matthew

2015-01-13  Matthew Wahab  <matthew.wahab@arm.com>

         * testsuite/g++.dg/torture/20141013.C: Set -fno-short-enums.
OK for the trunk.  Please install.

Thanks,
Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]