Skip to content
Snippets Groups Projects
Commit 4786fabe authored by Senthil Kumar Selvaraj's avatar Senthil Kumar Selvaraj Committed by Senthil Kumar Selvaraj
Browse files

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
parent b6adf1c5
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment