Re: Memory leaks in compiler

2008-01-17 Thread Kai Henningsen
On Thu, Jan 17, 2008 at 02:46:12PM -, Dave Korn wrote: > On 16 January 2008 22:09, Diego Novillo wrote: > > > On 1/16/08 4:16 PM, Andrew Haley wrote: > > > >> Because it's not a bug? You're changing the code to silence a false > >> negative, which this is what we here in England call "puttin

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Jonathan Wakely
On 18/01/2008, Jonathan Wakely <[EMAIL PROTECTED]> wrote: > > Yes, at the point of instantiation of Foo the friend is declared, > and can then be found by ADL because Foo is an associated type. > The reference parameter 'x' doesn't cause an instantiation, only 'weird' does. Forgot the reference -

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Jonathan Wakely
On 17/01/2008, Richard Guenther wrote: > > Well, a language lawyer can probably clear things up. From a look > at the std it looks like w/o a previous declaration the above should > be invalid. And at a different point it suggests the decl becomes > available. Yes, at the point of instantiation

Re: My email address has been changed

2008-01-17 Thread H.J. Lu
On Fri, Jan 18, 2008 at 10:20:23AM +1100, Ben Elliston wrote: > > My old email address, [EMAIL PROTECTED], may no longer works. My > > new email address is [EMAIL PROTECTED] > > Don't forget to update the MAINTAINERS file, HJ. > Hi Ben, I updated my email address in MAINTAINERS in gcc, gdb and

Re: GCC pretty printer + typedefs

2008-01-17 Thread Gabriel Dos Reis
On Thu, 17 Jan 2008, Taras Glek wrote: | Major Issue: Specifying TFF_CHASE_TYPEDEFS as a parameter only works with | top-level typenames because the C/C++ pretty printing code does not | support/propagate the flags parameter. Is this considered a bug or a TODO? | Would a patch to move the TFF* fla

Gcc stack alignment branch is created

2008-01-17 Thread H.J. Lu
I created gcc stack alignment branch to implement our proposal to automatically align stack: svn://gcc.gnu.org/svn/gcc/branches/stack I am enclosing the design document here. Joey, Xuepeng and I are working on it. We will start sending patches to gcc-patches with subject "[stack] x". We are t

My email address has been changed

2008-01-17 Thread H.J. Lu
Hi, My old email address, [EMAIL PROTECTED], may no longer works. My new email address is [EMAIL PROTECTED] H.J.

GCC pretty printer + typedefs

2008-01-17 Thread Taras Glek
Hi, I am working on a static analysis plugin for Mozilla. I noticed the the C++ frontend has a very convenient pretty-printing API exposed through (decl|type)_as_string. I use decl_as_string() to get string representations of types. The scripts are interested in both kinds of types: the type n

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Richard Guenther
On 17 Jan 2008 11:46:52 -0800, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > > "Richard Guenther" <[EMAIL PROTECTED]> writes: > > > > Well, first I think you'd need friend-injection or otherwise a global > > decl of the function. > > ADL works without friend injection. Look at 3.4.2 > [basic.looku

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Ian Lance Taylor
"Richard Guenther" <[EMAIL PROTECTED]> writes: > > > On Jan 17, 2008 2:12 PM, Dragan Milenkovic <[EMAIL PROTECTED]> wrote: > > > > Richard Guenther wrote: > > > > [snip] > > > > >> template > > > > >> struct Foo > > > > >> { > > > > >> template > > > > >> friend void func(const Foo &);

libgcc_s.so.1 for IRIX

2008-01-17 Thread joao
Dear all. I am trying to obtain a libgcc_s.so.1 for IRIX. I have downloaded and installed the fw_gcc-3.3.tardist, but the closest file to the one I want is libgcc.a. Could anybody help? Thamks, João.

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? [Emcraft #11717]

2008-01-17 Thread Gabriel Paubert
On Thu, Jan 17, 2008 at 05:48:10PM +0300, Sergei Poselenov wrote: > Hello Andrew, > > Andrew Haley wrote: > >Sergei Poselenov writes: > > > Hello Andrew, > > > > > > > Now, I sympathize that in your particular case you have a code size > > > > regression. This happens: when we do optimization in

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Richard Guenther
On 17 Jan 2008 09:09:38 -0800, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > > "Richard Guenther" <[EMAIL PROTECTED]> writes: > > > On Jan 17, 2008 2:12 PM, Dragan Milenkovic <[EMAIL PROTECTED]> wrote: > > > Richard Guenther wrote: > > > [snip] > > > >> template > > > >> struct Foo > > > >> { > >

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Ian Lance Taylor
"Richard Guenther" <[EMAIL PROTECTED]> writes: > On Jan 17, 2008 2:12 PM, Dragan Milenkovic <[EMAIL PROTECTED]> wrote: > > Richard Guenther wrote: > > [snip] > > >> template > > >> struct Foo > > >> { > > >> template > > >> friend void func(const Foo &); > > >> }; > > >> > > >> void ch

Re: Memory leaks in compiler

2008-01-17 Thread Joe Buck
On Thu, Jan 17, 2008 at 11:08:25AM -0500, Ross Ridge wrote: > Diego Novillo wrote: > >I agree. Freeing memory right before we exit is a waste of time. > > Dave Korn writes: > > So, no gcc without an MMU and virtual memory platform ever again? > >Shame, it used to run on Amigas. > > I don't know

Re: Memory leaks in compiler

2008-01-17 Thread Erik Trulsson
On Thu, Jan 17, 2008 at 11:08:25AM -0500, Ross Ridge wrote: > Diego Novillo wrote: > >I agree. Freeing memory right before we exit is a waste of time. > > Dave Korn writes: > > So, no gcc without an MMU and virtual memory platform ever again? > >Shame, it used to run on Amigas. > > I don't know

RE: Memory leaks in compiler

2008-01-17 Thread Ross Ridge
Diego Novillo wrote: >I agree. Freeing memory right before we exit is a waste of time. Dave Korn writes: > So, no gcc without an MMU and virtual memory platform ever again? >Shame, it used to run on Amigas. I don't know if GCC ever freed all of its memory before exiting. An operating system does

Re: jc1 out of memory error gcc 4.2.2 Linux 64-bit OS

2008-01-17 Thread Harpal Grover
> > I am trying to compile a java app. I don't have the script in front of > > me that i am using because I am at a client's office right now. The > > jist of > > the command line is as follows: > > > > gcj -O -fjni -s -main=main.App --classpath=x1.jar x2.jar x3.jar x4.jar > > x5.jar x6.jar

Re: Memory leaks in compiler

2008-01-17 Thread Tom Tromey
> "Dave" == Dave Korn <[EMAIL PROTECTED]> writes: Dave> So, no gcc without an MMU and virtual memory platform ever Dave> again? Shame, it used to run on Amigas. If you are serious about doing a port like this, then I will recant and support not only this patch, but all the other ones you wil

Re: History of m68k ABI and `-malign-int'?

2008-01-17 Thread Carlos O'Donell
On Thu, Jan 17, 2008 at 01:08:16AM +0100, Andreas Schwab wrote: > Carlos O'Donell <[EMAIL PROTECTED]> writes: > > > Why is 16-bit int alignment the default for m68k in gcc? > > > > Which ABIs influenced this decision? > > The original ABI was defined by Sun PCC. Note that the SysV ABI > actually

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? [Emcraft #11717]

2008-01-17 Thread Richard Guenther
On Jan 17, 2008 3:48 PM, Sergei Poselenov <[EMAIL PROTECTED]> wrote: > Hello Andrew, > > I agree. Actually, the CSiBE results are impressive: I've built the > bzip2 library for powerpc and got similar results. > > I wonder why GCC maintainers are ignoring the -Os regression for > most of their case

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? [Emcraft #11717]

2008-01-17 Thread Sergei Poselenov
Hello Andrew, Andrew Haley wrote: Sergei Poselenov writes: > Hello Andrew, > > > Now, I sympathize that in your particular case you have a code size > > regression. This happens: when we do optimization in gcc, some code > > bases will lose out. All that we can promise is that we try no

RE: Memory leaks in compiler

2008-01-17 Thread Dave Korn
On 16 January 2008 22:09, Diego Novillo wrote: > On 1/16/08 4:16 PM, Andrew Haley wrote: > >> Because it's not a bug? You're changing the code to silence a false >> negative, which this is what we here in England call "putting the cart >> before the horse." If we clean up all the memory regions

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Richard Guenther
On Jan 17, 2008 2:12 PM, Dragan Milenkovic <[EMAIL PROTECTED]> wrote: > Richard Guenther wrote: > [snip] > >> template > >> struct Foo > >> { > >> template > >> friend void func(const Foo &); > >> }; > >> > >> void check(const Foo & x) > >> { > >> // Foo weird; // uncomment this l

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Paolo Bonzini
template struct Foo { template friend void func(const Foo &); }; void check(const Foo & x) { // Foo weird; // uncomment this line and all works func(x);// <-- ERROR } Tested with gcc 4.0 - 4.3, and all behave the same: "error: 'func' was not declared in this scope

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Dragan Milenkovic
Richard Guenther wrote: [snip] template struct Foo { template friend void func(const Foo &); }; void check(const Foo & x) { // Foo weird; // uncomment this line and all works func(x);// <-- ERROR } Tested with gcc 4.0 - 4.3, and all behave the same: "error: 'func'

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?

2008-01-17 Thread Gabriel Paubert
Hello Sergei, On Thu, Jan 17, 2008 at 03:13:59PM +0300, Sergei Poselenov wrote: > I don't know now, actually, this is what I'm asking. As for the > target processor - as I stated in the initial message: > > ... > Currently, it builds as following: > ppc-linux-gcc -g -Os -fPIC -ffixed-r14

Re: A simple sample code involving templates, friends and lookup

2008-01-17 Thread Richard Guenther
On Jan 17, 2008 11:44 AM, Dragan Milenkovic <[EMAIL PROTECTED]> wrote: > Hello, > > I'm aware about these issues being around for quite a while now, but > there is still a chance this sample code can be helpful. I apologize > if someone gets annoyed :-P > > > template > struct Foo > { > templ

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?

2008-01-17 Thread Sergei Poselenov
Hello Gabriel, Gabriel Paubert wrote: On Wed, Jan 16, 2008 at 04:55:19PM +0300, Sergei Poselenov wrote: Hello, I've just noted an error in my calculations: not 40%, but 10% regression (used gdb to do the calculations and forgot to convert inputs to float). Sorry. But the problem still persist

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?

2008-01-17 Thread Gabriel Paubert
On Wed, Jan 16, 2008 at 04:55:19PM +0300, Sergei Poselenov wrote: > Hello, > > I've just noted an error in my calculations: not 40%, but 10% > regression (used gdb to do the calculations and forgot to convert > inputs to float). Sorry. > > But the problem still persists for me - I'm building an e

A simple sample code involving templates, friends and lookup

2008-01-17 Thread Dragan Milenkovic
Hello, I'm aware about these issues being around for quite a while now, but there is still a chance this sample code can be helpful. I apologize if someone gets annoyed :-P template struct Foo { template friend void func(const Foo &); }; void check(const Foo & x) { // Foo weird;