This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: How to tell gcc that my int32 type is compatible with printf %d?
- To: "'Joseph S. Myers'" <jsm28 at cam dot ac dot uk>
- Subject: RE: How to tell gcc that my int32 type is compatible with printf %d?
- From: "Neulinger, Nathan" <nneul at umr dot edu>
- Date: Tue, 5 Jun 2001 13:05:06 -0500
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
Unfortunately, this code will likely continue to need to be compiled with
old compilers (at least until kernel folks say that 3.0 is cool for linux
kernels.
-- Nathan
> -----Original Message-----
> From: Joseph S. Myers [mailto:jsm28@cam.ac.uk]
> Sent: Tuesday, June 05, 2001 1:03 PM
> To: Neulinger, Nathan
> Cc: 'gcc@gcc.gnu.org'
> Subject: Re: How to tell gcc that my int32 type is compatible with
> printf %d?
>
>
> On Tue, 5 Jun 2001, Neulinger, Nathan wrote:
>
> > I've cleaning up warnings in an app that uses it's own int types for
> > platform compatability. It has a 'typedef int afs_int32',
> yet all the
> > printf/sprintf/etc. args are complaining:
> >
> > ktime.c:463: warning: int format, afs_int32 arg (arg 5)
> >
> > Is there any simple way to indicate to gcc (in a way that
> won't break
> > compatability with other c compilers) that afs_int32 is
> compatible so it
> > won't generate warning? (Other than putting (int) in front
> of every arg to
> > printf/etc.)
>
> You'll need to provide a complete bug report with
> preprocessed source.
> If afs_int32 is a typedef for int (not long) this should work.
>
> --
> Joseph S. Myers
> jsm28@cam.ac.uk
>