Compiling GCC With a C++ Compiler (g++)
Ranjit Mathew
rmathew@gmail.com
Mon Oct 11 09:53:00 GMT 2004
Hi,
If I try compiling bits that include "gcc/tree.h" with
g++, I get:
/home/ranmath/src/gcc/gcc/gcc/tree.h:2504: error: member 'tree_string tree_node::string' with copy assignment operator not allowed in union
The definition of tree_string is:
struct tree_string GTY(())
{
struct tree_common common;
int length;
const char str[1];
};
If the "const" is removed from above, the compilation
proceeds.
There were a flurry of patches to make GCC compilable
with a C++ compiler in the recent past and I thought
it was now done... Didn't anyone else run into this?
(Apart from Tom, who suggested the fix above.)
Is this a bug? If yes, is it in the C++ compiler or
in the definition of tree_string?
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Gcc
mailing list