Fix bogus failure of Wlogical-op-1.c for avr
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Wed, 16 Nov 2016 09:28:40 +0000 (09:28 +0000)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Wed, 16 Nov 2016 09:28:40 +0000 (09:28 +0000)
commit4786fabecc8559f04eed93d3d49738680b52536b
tree21c370d260e45cb1cbf0398b895943c99a39effe
parentb6adf1c5fb249497a0f35a2ffb9897b35764d3c9
Fix bogus failure of Wlogical-op-1.c for avr

The test assumes short is always smaller than int, and therefore does not
expect a warning when the logical operands are of type short and int.

This isn't true for the avr - shorts and ints are of the same size, and
therefore the warning triggers for the above case also.

Fix by explicitly typedef'ing __INT32_TYPE for int and __INT16_TYPE__ for short
if the target's int size is less than 4 bytes.

gcc/testsuite/
2016-11-16  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* c-c++-common/Wlogical-op-1.c: Use __INT{16,32}_TYPE__ instead
of {short,int} if __SIZEOF_INT__ is less than 4 bytes.

From-SVN: r242472
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-op-1.c