This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Mon, 2015-03-16 at 13:02 -0500, Joel Sherrill wrote: > But remember, not every newlib target is an RTEMS target. This balance > could shift based on the other bare machine targets. Does someone > have *-elf targets handy for targets that do not have RTEMS to test using > my script and test case? Attached are what I ended up with after fixing the warnings. -- Yaakov Selkowitz Associate Software Engineer, ARM Red Hat, Inc.
#include <stdio.h>
#include <inttypes.h>
#if (__SIZEOF_LONG_LONG__ == __SIZEOF_PTRDIFF_T__)
#if defined(__aarch64__) || \
defined(__ia64__) || \
defined(__mmix__) || \
defined(__sh__) || \
defined(__sparc_v9__) || \
defined(__x86_64__)
#define __myPRIPTR(x) __STRINGIFY(l##x)
#else
#define __myPRIPTR(x) __STRINGIFY(ll##x)
#endif
#elif (__SIZEOF_LONG__ == __SIZEOF_PTRDIFF_T__)
#if defined(__arm__) || \
defined(__fr30__) || \
defined(__frv__) || \
defined(__lm32__) || \
defined(__mcore__) || \
defined(__microblaze__) || \
defined(__mips__) || \
defined(__mn10300__) || \
defined(__moxie__) || \
defined(__nios2__) || \
defined(__PPC__) || \
(defined(__sh__) && !defined(__SH5__)) || \
defined(__sparc__) || \
defined(__TMS320C6X__) || \
defined(__v850__)
#define __myPRIPTR(x) __STRINGIFY(x)
#else
#define __myPRIPTR(x) __STRINGIFY(l##x)
#endif
#else
#define __myPRIPTR(x) __STRINGIFY(x)
#endif
#define myPRIuPTR __myPRIPTR(u)
void f( uintptr_t x)
{
printf( "%" myPRIuPTR "\n", x );
}
Attachment:
uptrtest.sh
Description: application/shellscript
Attachment:
uptrtest.out
Description: chemical/gulp
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |