[GCC-XML] error: unable to emulate 'TI'

Brad King brad.king at kitware.com
Mon Nov 7 16:36:22 EST 2011

On 11/7/2011 2:14 PM, Davidson, Josh wrote:
> Just a little background...I'm using gccxml for Linux, Cygwin, and MinGW.
 > I know MinGW isn't officially supported (or at least didn't use to be),
 > but I've had no issues thus far with it.  That is, until I attempted to
 > get a 64-bit version working.  I was able to get gccxml built, but when
 > I run, I get the following error:
> C:\Users\davidsj2\scratch>gccxml test.cpp
> test.cpp:1: error: unable to emulate 'TI'
> c:/mingw64-i686-20110207/lib/gcc/../../x86_64-w64-mingw32/include/_mingw.h:194: error: unable to emulate 'TI'

I think this is because gccxml uses a GCC 4.2 parser internally that is
compiled for a 32-bit target.  It does not know how to handle the
__mode__(TI) attribute it sees in the MinGW header when preprocessed
for a 64-bit build.  I can produce the same error outside of gccxml
using just GCC for 32-bit MinGW:

  $ cat test.c
  typedef int int128 __attribute__ ((__mode__ (TI)));

  $ gcc --version
  gcc.exe (GCC) 4.5.2

  $ gcc -c test.c
  test.c:1:1: error: unable to emulate 'TI'

Since gccxml is interested only in the interface and not in the ABI
you may be able to work around the error by adding "-D__mode__(x)="
to the command line.  It works for the above error:

  $ gcc -c test.c "-D__mode__(x)="


More information about the gccxml mailing list