#1366 Warnings when using inttypes.i and swig -Wall flag

None
closed
inttypes (1)
5
2014-04-08
2014-04-08
Mark
No

I am getting warnings with both swig 1.3.4 and 3.0.0 when I invoke it like this while using %include inttypes.i in my foo.i file:

/usr/bin/swig -c++ -perl5 -Wall -DSWIGWORDSIZE64=1 -o foo_wrap.cc foo.i
/usr/share/swig/3.0.0/inttypes.i:61: Warning 322: Redundant redeclaration of 'strtoimax',
/usr/share/swig/3.0.0/inttypes.i:45: Warning 322: previous declaration of 'strtoimax'.
/usr/share/swig/3.0.0/inttypes.i:64: Warning 322: Redundant redeclaration of 'strtoumax',
/usr/share/swig/3.0.0/inttypes.i:48: Warning 322: previous declaration of 'strtoumax'.

Here's foo.i:

%module foo
%include "std_string.i"
%include "inttypes.i"
%{
#include "foo.hh"
%}
%include "foo.hh"

And foo.hh only includes "cinttypes"
and has a couple uint16_t variables declared.

I'm using...

% g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)

I can comment out inttypes.i lines 45 & 48 and eliminate the warnings but I wonder why there are duplicates in the first place?

Discussion

  • William Fulton
    William Fulton
    2014-04-08

    • status: open --> closed
    • assigned_to: William Fulton
    • Group: -->
     
  • William Fulton
    William Fulton
    2014-04-08

    Fixed for SWIG 3.0.1