This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: inttypes.h bug leads to inconsistent warnings cross platform
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>,"newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Mon, 8 Sep 2014 03:12:14 -0500
- Subject: Re: inttypes.h bug leads to inconsistent warnings cross platform
- Authentication-results: sourceware.org; auth=none
- References: <5409CAAD dot 1030801 at oarcorp dot com> <540D4927 dot 60500 at embedded-brains dot de>
On September 8, 2014 1:13:59 AM CDT, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:
>On 05/09/14 16:37, Joel Sherrill wrote:
>> Any thoughts on how to detect when it should use
>> "ul" for long uinptr_t instead of "u" for targets with
>> int uintptr_t?
>
>I think there are only two options, loop
>
>1. add a cascade of #ifdef arch for all special cases, or
>
>2. add builtin defines to GCC.
This is the conclusion I came to.
I am not sure which is less painful. My gut says it would have to be added to a lot more places in gcc than newlib. It is easy to solve in newlib. Although it seems more correct to add it to GCC.
I suppose I should restart this thread over at GCC to get more opinions.
I am traveling this week. I reverted the warning fix patch locally if you want too revert it in the RTEMS tree.
--joel