]> git.ipfire.org Git - thirdparty/gcc.git/commit
g++.dg/warn/Warray-bounds-10..13: Fix for 32-bit newlib targets
authorHans-Peter Nilsson <hp@axis.com>
Mon, 22 Feb 2021 19:36:01 +0000 (20:36 +0100)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 22 Feb 2021 19:47:15 +0000 (20:47 +0100)
commit8e99b5ba4c19526335fe9cabdc6df7fb2edcfe6f
treef0ca48703d2917cc832141b1fed4068437f5b489
parenta7de0ffa34a9559919b14094b804175d7d9b446f
g++.dg/warn/Warray-bounds-10..13: Fix for 32-bit newlib targets

See gcc/config/newlib-stdint.h, where targets that have
LONG_TYPE_SIZE == 32, get __INT32_TYPE__ defined to "long
int".

All these tests have "typedef __INT32_TYPE__ int32_t;".
Thus the tests fail for 32-bit newlib targets due to related
warning messages being matched to "aka int" where the
emitted message for these targets have "aka long int".

Tested cris-elf and x86_64-linux, committed as obvious.

gcc/testsuite:
* g++.dg/warn/Warray-bounds-10.C, g++.dg/warn/Warray-bounds-11.C,
g++.dg/warn/Warray-bounds-12.C, g++.dg/warn/Warray-bounds-13.C:
Handle __INT32_TYPE__ being "long int".
gcc/testsuite/g++.dg/warn/Warray-bounds-10.C
gcc/testsuite/g++.dg/warn/Warray-bounds-11.C
gcc/testsuite/g++.dg/warn/Warray-bounds-12.C
gcc/testsuite/g++.dg/warn/Warray-bounds-13.C