This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Provide stdint.h for Tru64 UNIX V[45]
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> On Tue, 17 Nov 2009, Rainer Orth wrote:
>
>> There's one testsuite problem I'd like to get an opinion about:
>> gcc.dg/c99-stdint-6.c is unsupported on alpha-dec-osf4.0f, which lacks
>> inttypes.h completely, but FAILs on alpha-dec-osf5.1b which has an
>> incomplete inttypes.h, i.e. without definitions for *int_least*_t,
>> *int_fast*t, *intmax_t. I could either augment the header via
>> fixincludes, or XFAIL the test on V5.1B. Preferences?
>
> On older Solaris versions, that test uses -DNO_FAST_TYPES to disable the
> tests for types inttypes.h is missing. You could add NO_LEAST_TYPES and
> NO_MAX_TYPES conditionals and enable those defines for alpha-dec-osf5.1b.
True: like so (this time with a ChangeLog entry).
I cannot test right now due to PR bootstrap/42068; will re-run bootstrap
once this is fixed.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2009-11-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
* config.gcc (alpha*-dec-osf[45]*): Set use_gcc_stdint.
* config/alpha/osf.h (SIG_ATOMIC_TYPE): Define.
(INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE): Define.
(UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE): Define.
(INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
(INT_LEAST64_TYPE): Define.
(UINT_LEAST8_TYPE, UINT_LEAST16_TYPE, UINT_LEAST32_TYPE,
UINT_LEAST64_TYPE): Define.
(INT_FAST8_TYPE, INT_FAST16_TYPE, INT_FAST32_TYPE,
INT_FAST64_TYPE): Define.
(UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE): Define.
(INTPTR_TYPE, UINTPTR_TYPE): Define.
gcc/testsuite:
* gcc.dg/c99-stdint-6.c: Set dg-options for alpha*-dec-osf5*.
Wrap *int_least*_t tests in !NO_LEAST_TYPES.
Wrap *intmax_t tests in !NO_MAX_TYPES.
Index: c99-stdint-6.c
===================================================================
--- c99-stdint-6.c (revision 154216)
+++ c99-stdint-6.c (working copy)
@@ -3,6 +3,7 @@
/* { dg-do compile { target inttypes_types } } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
/* { dg-options "-std=gnu99 -pedantic-errors -DNO_FAST_TYPES" { target *-*-solaris2.[789]* } } */
+/* { dg-options "-std=gnu99 -pedantic-errors -DNO_LEAST_TYPES -DNO_FAST_TYPES -DNO_MAX_TYPES" { target alpha*-dec-osf5* } } */
#include <inttypes.h>
#include <signal.h>
@@ -37,6 +38,7 @@
#ifdef __UINT64_TYPE__
CHECK_TYPES(__UINT64_TYPE__, uint64_t);
#endif
+#ifndef NO_LEAST_TYPES
CHECK_TYPES(__INT_LEAST8_TYPE__, int_least8_t);
CHECK_TYPES(__INT_LEAST16_TYPE__, int_least16_t);
CHECK_TYPES(__INT_LEAST32_TYPE__, int_least32_t);
@@ -45,6 +47,7 @@
CHECK_TYPES(__UINT_LEAST16_TYPE__, uint_least16_t);
CHECK_TYPES(__UINT_LEAST32_TYPE__, uint_least32_t);
CHECK_TYPES(__UINT_LEAST64_TYPE__, uint_least64_t);
+#endif
#ifndef NO_FAST_TYPES
CHECK_TYPES(__INT_FAST8_TYPE__, int_fast8_t);
CHECK_TYPES(__INT_FAST16_TYPE__, int_fast16_t);
@@ -61,7 +64,9 @@
#ifdef __UINTPTR_TYPE__
CHECK_TYPES(__UINTPTR_TYPE__, uintptr_t);
#endif
+#ifndef NO_MAX_TYPES
CHECK_TYPES(__INTMAX_TYPE__, intmax_t);
CHECK_TYPES(__UINTMAX_TYPE__, uintmax_t);
+#endif
CHECK_TYPES(__SIG_ATOMIC_TYPE__, sig_atomic_t);
}