gcc format warnings and 64 bits...

Jeremy Allison jallison at cthulhu.engr.sgi.com
Wed Sep 2 22:43:53 GMT 1998

Answering my own questions here (is there anybody out there :-):

> We currently turn on format warnings for Debug1
> and friends using the 
> __attribute__ ((format (printf, 1, 2)))
> definition for gcc compiles. However, when
> printing a 64 bit long long size, you need
> to use the format "%lld" - which gcc complains
> bitterly about.

You need to turn off the -pedantic-errors option
to gcc - from the man page :

    Issue all the warnings demanded by strict ANSI standard C; reject all
    programs that use forbidden extensions.

    Valid  ANSI  standard  C  programs  should compile properly with or without
    this option (though a rare few will require `-ansi').  However, without this
    option,  certain  GNU extensions  and  traditional  C features are supported
    as well.  With this option, they are rejected.  There is no reason to  use
    this  option;  it  exists  only  to  satisfy pedants.

Well I guess that tells me where I sit :-).

Yours pedanticly,


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list