[GCC-XML] Compiling C code with gccxml - type conversion errors

Sarvi Shanmgham sarvi at cisco.com
Thu Feb 23 19:06:50 EST 2012


I have the latest gccxml installed.
I am trying to compile a C source files

I believe it is trying to treat as a C++ code and throws up some type
conversion errors like
error: invalid conversion from 'char*' to 'uchar*'

How can I force it to treat the code as C code instead of C++ code?

Thx,
Sarvi
-----------
My gccxml_config file is as follows:
GCCXML_COMPILER="/auto/tools/latest/i686-pc-linux/bin/binos_c4.2.1-p5.mips64
-octeon-linux-gcc"
GCCXML_CXXFLAGS=

I invoke GCCXML as follows with additional command line ­D and ­I
includes/definitions
GCCXML_CONFIG=/nobackup/sarvi/mbs-ws1/nova/gccxml_config
/ws/sarvi-sjc/mytools/bin/gccxml  -fxml=ipc_ports.gccxml   ipc_ports.c

I am seeing the following type of errors
.....
infra/spi/ipc/src/../include/ipc_posix.h:347: error: invalid conversion from
'char*' to 'uchar*'
infra/spi/ipc/src/../include/ipc_posix.h:347: error:   initializing argument
1 of 'ulong BITMASK_FIND_FIRST_SET(uchar*, ulong, ulong*)'
infra/spi/ipc/src/../include/ipc_posix.h: In function 'ulong
BITMASK_FIND_FIRST_CLEAR_ULL_BE(ulonglong*, ulong, ulong*)':
infra/spi/ipc/src/../include/ipc_posix.h:364: error: invalid conversion from
'char*' to 'uchar*'
.........
infra/spi/ipc/src/../include/ipc_util.h: At global scope:
infra/spi/ipc/src/../include/ipc_util.h:97: error: expected unqualified-id
before 'delete'
In file included from infra/spi/ipc/src/ipc_ports.c:28:
infra/spi/ipc/src/../include/ipc_ports.h:324: error: expected ',' or '...'
before 'template'
infra/spi/ipc/src/../include/ipc_ports.h:328: error: expected ',' or '...'
before 'template'
infra/spi/ipc/src/ipc_ports.c: In function 'void
spi_ipc_delete_port(void*)':
infra/spi/ipc/src/ipc_ports.c:256: error: invalid conversion from 'void*' to
'spi_ipc_port_data*'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20120223/bdcf2c5d/attachment-0001.html>


More information about the gccxml mailing list