Compiling GCC With a C++ Compiler (g++)

Gabriel Dos Reis
Wed Oct 13 06:24:00 GMT 2004

Phil Edwards <> writes:


| particular place.  Since member init-lists aren't available for STRING_CST,
| we have to cast away the const in build_string

which is undefined behaviour by C rules  (and C++ too).

| The const should stay; C is not C++, and the way in which write-once

Most certainly C is not C++, and nobody is arguing otherwise.
However, there is a large and good intersection of both languages
where useful programs can be expressed through constructs with defined

Taking explicit steps to put in hackery that 

  (1) is undefined behaviour;
  (2) break works to make the compiler compilable with C++ (which was
     agreed upon) is both unproductive and <bip censored>.

-- Gaby

More information about the Gcc mailing list