Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-27 Thread Gabriel Dos Reis
On Fri, 27 Jul 2007, Richard Smith wrote: | > | The general philosophy in the current ABI would seem to be | > | that the expression is encoded in terms of its template | > | parameters, and not with the evaluated expression with the | > | subsituted argument. | > | > That is correct. For a compi

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-27 Thread Richard Smith
Gabriel Dos Reis wrote: > At the C++ language level, there are concerns of how to specify the > interaction. All I claimed was that the observable semantics > does not need further specification to make the examples work. > > At the compiler internals level, how overloads are handled has a much >

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-27 Thread Gabriel Dos Reis
On Fri, 27 Jul 2007, Richard Smith wrote: | Gabriel Dos Reis wrote: | | > On Wednesday July 18, 2007 I brought factual evidence to | > that claim by showing g++ behaviour on all of the examples | > discussed (including those from the "decltype" proposal). | > (All I did was to encode call express

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Richard Smith
Gabriel Dos Reis wrote: > On Wednesday July 18, 2007 I brought factual evidence to > that claim by showing g++ behaviour on all of the examples > discussed (including those from the "decltype" proposal). > (All I did was to encode call expressions, new expressions > and a few other tree nodes). I

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Doug Gregor
On 7/26/07, Richard Smith <[EMAIL PROTECTED]> wrote: template class is_default_constructible { template struct helper {}; typedef char no; typedef char yes[2]; static no fn(...); static yes fn( helper* ); public: static const bool value = sizeof(fn(0)) == sizeof(yes);

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Richard Smith
Doug Gregor wrote: > Now, we're saying that any expressions are valid in > sizeof, decltype, and constant expressions. If those > expressions fail to type-check during substitution, it > will be a SFINAE case. Just to be sure we're not talking at cross purposes, can I check that the current think

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Gabriel Dos Reis
Richard Smith <[EMAIL PROTECTED]> writes: | About five years ago, I reported a bug about an ICE when | trying to mangle expressions involving operator new. | | http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01417.html | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6057 | | A three line example

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Doug Gregor
On 7/26/07, Richard Smith <[EMAIL PROTECTED]> wrote: Doug Gregor wrote: > This kind of thing came up that the last C++ committee meeting, as > part of core issue 339: > > http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#339 > > Name mangling is part of the problem, but not all of it.

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Richard Smith
Doug Gregor wrote: > Hi Richard, > > On 7/26/07, Richard Smith <[EMAIL PROTECTED]> wrote: > > > A three line example exhibiting the ICE is: > > > > template struct helper {}; > > template void check( helper* ); > > int main() { check(0); } > > [...] > > This kind of thing came up that the

Re: C++ ABI: name mangling of operator new [bug 6057]

2007-07-26 Thread Doug Gregor
Hi Richard, On 7/26/07, Richard Smith <[EMAIL PROTECTED]> wrote: About five years ago, I reported a bug about an ICE when trying to mangle expressions involving operator new. http://gcc.gnu.org/ml/gcc-patches/2002-03/msg01417.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6057 A three l