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: "Neulinger, Nathan" <nneul at umr dot edu>
- Subject: Re: How to tell gcc that my int32 type is compatible with printf%d?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 5 Jun 2001 19:02:52 +0100 (BST)
- cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
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