On Tue, Sep 11, 2012 at 01:46:37PM +0100, Kyrylo Tkachov wrote:
> Add -fno-short-enums flag to test c-c++-common/pr51712.c as discussed in
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712.
> This removes the excess warning that caused the test to fail.
> Tested in arm-none-eabi configuration. The test now passes.
> Comment? Ok for trunk?
>
> Thanks,
> Kyrill
>
> gcc/testsuite
>
> 2012-09-11 Kyrylo Tkachov <[email protected]>
>
> * c-c++-common/pr51712.c: Add -fno-short-enums flag to test.
> --- a/gcc/testsuite/c-c++-common/pr51712.c
> +++ b/gcc/testsuite/c-c++-common/pr51712.c
> @@ -1,6 +1,6 @@
> /* PR c/51712 */
> /* { dg-do compile } */
> -/* { dg-options "-Wtype-limits" } */
> +/* { dg-options "-Wtype-limits -fno-short-enums" {target short_enums} } */
That is wrong, it means that on non-short_enums targets suddenly no
dg-options would be passed.
Instead you should keep the dg-options line as is and add
/* { dg-additional-options "-fno-short-enums" { target short_enums } } */
or just add the new dg-options line but keep the old one as well (though,
dg-additional-options is the new preferred way).
Jakub