This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> -----Original Message-----
> From: gcc-owner On Behalf Of Gabriel Dos Reis
> Sent: 13 October 2004 04:47

> 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).

  I'll bet alias analysis just loves it too.  Wouldn't using tricks like
this lead to a situation in the future (if and) when there's full IPA in gcc
and it can't bootstrap itself reliably any more?

> | 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
> meaning. 
> 
> 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>.

  Deeply agree.  There are other ways to enforce the desired semantics and
they're to do with good software engineering methodology.

  The entire situation is eerily isomorphic to the thing about
RTX_UNCHANGING_P and stuff that does change but only once..... !


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]