This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]