public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Problems with inttypes.h on arm
@ 2024-05-10 17:36 Stefan Tauner
  2024-05-10 19:25 ` brian.inglis
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Tauner @ 2024-05-10 17:36 UTC (permalink / raw)
  To: newlib

Hi,

there seems to have been a problem introduced recently-ish - but I am
not sure whether GCC or newlib are to blame/able to fix this and hope
someone here can shed some light on it. I have briefly looked at the
relevant(?) files in newlib's git and could not find any recent changes
whatsoever.

Basically, PRIi64 and friends do not get defined properly (unless
sys/_stdint.h is included explicitly before including inttypes.h).
Jonathan Neuschäfer has reported this in detail for Debian's
gcc-arm-none-eabi: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067692
However, I have noticed the same problem with the GCC 12.3.1-based IDE
shipped by NXP for their Microcontrollers (that according to them
"bundles an unmodified form of the GNU ARM Embedded Toolchain").

Does anybody have any ideas what the cause could be? Thanks!

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems with inttypes.h on arm
  2024-05-10 17:36 Problems with inttypes.h on arm Stefan Tauner
@ 2024-05-10 19:25 ` brian.inglis
  0 siblings, 0 replies; 2+ messages in thread
From: brian.inglis @ 2024-05-10 19:25 UTC (permalink / raw)
  To: newlib

On 2024-05-10 11:36, Stefan Tauner wrote:
> there seems to have been a problem introduced recently-ish - but I am
> not sure whether GCC or newlib are to blame/able to fix this and hope
> someone here can shed some light on it. I have briefly looked at the
> relevant(?) files in newlib's git and could not find any recent changes
> whatsoever.
> 
> Basically, PRIi64 and friends do not get defined properly (unless
> sys/_stdint.h is included explicitly before including inttypes.h).
> Jonathan Neuschäfer has reported this in detail for Debian's
> gcc-arm-none-eabi: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067692
> However, I have noticed the same problem with the GCC 12.3.1-based IDE
> shipped by NXP for their Microcontrollers (that according to them
> "bundles an unmodified form of the GNU ARM Embedded Toolchain").
> 
> Does anybody have any ideas what the cause could be? Thanks!

Build newlib with or define _WANT_IO_C99_FORMATS, and run with compiler or 
header included in inttypes.h defining long int types > 32 bit with any of the 
symbols used in:

	newlib/libc/include/machine/_default_types.h

or in some override as in sys/_stdint.h?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-10 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10 17:36 Problems with inttypes.h on arm Stefan Tauner
2024-05-10 19:25 ` brian.inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).