[testsuite] Fix some more C and C++ testcases on Tru64 UNIX
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Wed Nov 10 18:02:00 GMT 2010
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> On Mon, 8 Nov 2010, Rainer Orth wrote:
>
>> * gcc.dg/intmax_t-1.c currently fails like this:
>>
>> FAIL: gcc.dg/intmax_t-1.c (test for excess errors)
>> Excess errors:
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:18:3: error: 'im_t_p' undeclared (first use in this function)
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:18:3: note: each undeclared identifier is reported only once for each function it appears in
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:24:3: error: 'uim_t_p' undeclared (first use in this function)
>>
>> The native <inttypes.h> lacks definitions of intmax_t and uintmax_t.
>> One could fix this by replacing <inttypes.h> by <stdint.h>. That file
>> is now generated at build time and contains a definition of intmax_t.
>> I'm not completely sure what the test is supposed to check in this
>> situation, though. Joseph?
>
> The test is supposed to verify that GCC's notion of certain types agrees
> with that in the system headers. It's effectively a subset of
> c99-stdint-6.c, dating from when GCC only knew about a few of the stdint.h
> types. It includes <inttypes.h> because some systems (based on early C9X
> drafts) provide that without <stdint.h>. If the system in question
> doesn't provide intmax_t and uintmax_t in <inttypes.h>, you may as well
> skip the test intmax_t-1.c as not having anything useful to test.
That's what I've done now. I've just commited the whole patch with this
addition.
Thanks.
Rainer
2010-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.dg/intmax_t-1.c: Skip on alpha*-dec-osf*.
diff -r f5914a010793 gcc/testsuite/gcc.dg/intmax_t-1.c
--- a/gcc/testsuite/gcc.dg/intmax_t-1.c Mon Nov 08 17:14:13 2010 +0100
+++ b/gcc/testsuite/gcc.dg/intmax_t-1.c Wed Nov 10 18:38:56 2010 +0100
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
/* { dg-error "" "" { target { { *arm*-*-*elf* xtensa*-*-elf* } || vxworks_kernel } } 0 } */
+/* { dg-skip-if "No *intmax_t in <inttypes.h>" { alpha*-dec-osf* } } */
/* Compile with -Wall to get a warning if built-in and system intmax_t don't
match. */
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list