Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Segher Boessenkool
The online docs at http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Other-Builtins.html has a confusing (to me) example of __builtin_expect. Could someone take a look at this? Since you are limited to integral expressions for exp, you should use constructions such as if (__builtin_

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Jonathan Wakely
On 20 December 2011 12:49, Segher Boessenkool wrote: > > The point of the example is that you cannot write > >          if (__builtin_expect (ptr, 1)) >            error (); > > so the "!= NULL" is important here.  But you are right that > "error ()" is a bit unexpected; care to send a patch that c

Help with generating 'memset' for loop initialization

2011-12-20 Thread Rohit Arul Raj
Hello All, With the code given below, i expected the ppc compiler (e500mc v4.6.2) to generate 'memset' zero call for loop initialization (at '-O3'), but it generates a loop. Case:1 int a[18], b[18]; foo () { int i; for (i=0; i < 18; i++) a[i] = 0; } Also based on the '-ftree-loop-

Misleading error if the type in catch() is ambiguous

2011-12-20 Thread Peter A. Felvegi
Dear All, I suspect there is a regression from g++ 4.4 in later versions. If the name of the class is ambiguous in a catch(), this fact is not reported. I had checked bz, but not found this particular case: http://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=ambiguous Attached a simple test c

Re: Help with generating 'memset' for loop initialization

2011-12-20 Thread Richard Guenther
On Tue, Dec 20, 2011 at 2:23 PM, Rohit Arul Raj wrote: > Hello All, > > With the code given below, i expected the ppc compiler (e500mc v4.6.2) > to generate 'memset' zero  call for loop initialization (at '-O3'), > but it generates a loop. > > Case:1 > > int a[18], b[18]; > foo () { >   int i; > >

Re: Misleading error if the type in catch() is ambiguous

2011-12-20 Thread Jonathan Wakely
On 20 December 2011 13:31, Peter A. Felvegi wrote: > > I suspect there is a regression from g++ 4.4 in later versions. If the name > of the class is ambiguous in a catch(), this fact is not reported. Bugs should be reported to bugzilla: http://gcc.gnu.org/bugs/#report Please also provide a reduce

Re: Misleading error if the type in catch() is ambiguous

2011-12-20 Thread Peter A. Felvegi
I've submitted a bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51640 Regards, Peter

gcc-4.4-20111220 is now available

2011-12-20 Thread gccadmin
Snapshot gcc-4.4-20111220 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.4-20111220/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.4 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: Modifying the datatype of a formal parameter

2011-12-20 Thread Matt Davis
Here is a follow up. I am closer to what I need, but not quite there yet. Basically I just want to switch the type of one formal parameter to a different type. On Mon, Dec 19, 2011 at 11:05 PM, Matt Davis wrote: > Hi Martin and thank you very much for your reply.  I do have some more > resoluti

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Jim Avera
Ok, here is a patch which improves the example: --- gcc/doc/extend.texi.ORIG    2011-12-20 17:35:32.236578828 -0800 +++ gcc/doc/extend.texi    2011-12-20 17:37:10.460583316 -0800 @@ -7932,7 +7932,7 @@    @smallexample  if (__builtin_expect (ptr != NULL, 1)) -  error (); +  ptr->do_something();  @e

Which Binutils should I use for performing daily regression test on trunk?

2011-12-20 Thread Terry Guo
Hi, I plan to set up daily regression test on trunk for target ARM-NONE-EABI and post results to gcc-testresults mailing list. Which Binutils should I use, the Binutils trunk or the latest released Binutils? And which way is recommended, building from a combined tree or building separately? If the