Re: Weird result for modulus operation

2008-04-29 Thread Paolo Bonzini
Ang Way Chuang wrote: Ang Way Chuang wrote: Andrew Pinski wrote: On Tue, Apr 29, 2008 at 9:08 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: Thanks for the speedy reply. But why this code: int a = 17, b = 16; a = a++ % 16; results in a = 2 then? I think I need to know what i

Re: Weird result for modulus operation

2008-04-29 Thread Ang Way Chuang
Ang Way Chuang wrote: Andrew Pinski wrote: On Tue, Apr 29, 2008 at 9:08 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: Thanks for the speedy reply. But why this code: int a = 17, b = 16; a = a++ % 16; results in a = 2 then? I think I need to know what is sequence point. I'll

Re: Weird result for modulus operation

2008-04-29 Thread Ang Way Chuang
Andrew Pinski wrote: On Tue, Apr 29, 2008 at 9:08 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: Thanks for the speedy reply. But why this code: int a = 17, b = 16; a = a++ % 16; results in a = 2 then? I think I need to know what is sequence point. I'll google that. As I men

Re: Weird result for modulus operation

2008-04-29 Thread Andrew Pinski
On Tue, Apr 29, 2008 at 9:08 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: > Thanks for the speedy reply. But why this code: > > int a = 17, b = 16; > a = a++ % 16; > > results in a = 2 then? I think I need to know what is sequence point. I'll > google that. As I mentioned, the c

Re: Weird result for modulus operation

2008-04-29 Thread Ang Way Chuang
Andrew Pinski wrote: On Tue, Apr 29, 2008 at 8:50 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: abc.a = abc.a++ % abc.b; You are assigning to abc.a twice without a sequence point inbetween so this code is undefined as the order of evaluation of expressions without a sequence point is

Re: Weird result for modulus operation

2008-04-29 Thread Andrew Pinski
On Tue, Apr 29, 2008 at 8:50 PM, Ang Way Chuang <[EMAIL PROTECTED]> wrote: > abc.a = abc.a++ % abc.b; You are assigning to abc.a twice without a sequence point inbetween so this code is undefined as the order of evaluation of expressions without a sequence point is unspecified. Thanks, A

Weird result for modulus operation

2008-04-29 Thread Ang Way Chuang
Hi all, Firstly, I want to thank gcc developers for the wonderful compiler suite. I ran into a problem. I am not whether this is regression or not. I compiled the following code using gcc-4.2.3 ubuntu 8.04 x86-64 and gcc-4.1.2 fedora 8 i686 struct abc { int a; int b

Re: IRA for GCC 4.4

2008-04-29 Thread Vladimir Makarov
J.C. Pizarro wrote: On Tue, 29 Apr 2008 20:25:56 +0200, "Steven Bosscher" <[EMAIL PROTECTED]> wrote: On Tue, Apr 29, 2008 at 6:22 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: Vladimir, if you feel that Peter's code cannot be used directly in IRA, would you please explain why not?

Re: IRA for GCC 4.4

2008-04-29 Thread Vladimir Makarov
Steven Bosscher wrote: On Tue, Apr 29, 2008 at 6:22 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: Vladimir, if you feel that Peter's code cannot be used directly in IRA, would you please explain why not? I think he already has explained, see http://gcc.gnu.org/ml/gcc/2008-04/msg00730.h

Re: IRA for GCC 4.4

2008-04-29 Thread Vladimir Makarov
Mark Mitchell wrote: Kenneth Zadeck wrote: Thanks, Peter. That was clever and email is very enlightening. I have analogous idea for more compact conflict matrix representation. I am currently working on bit matrix compression. It is not implemented yet. I hope it will be ready in a week.

Re: libstdc++ svn head broken

2008-04-29 Thread Benjamin Kosnik
> Doing a build of gcc from revision 134693 with The build issue should be fixed post 134776. -benjamin

Re: IRA for GCC 4.4

2008-04-29 Thread J.C. Pizarro
On Tue, 29 Apr 2008 20:25:56 +0200, "Steven Bosscher" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 6:22 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: > > Vladimir, if you feel that Peter's code cannot be used directly in IRA, > > would you please explain why not? > > I think he already has

Re: IRA for GCC 4.4

2008-04-29 Thread Steven Bosscher
On Tue, Apr 29, 2008 at 6:22 PM, Mark Mitchell <[EMAIL PROTECTED]> wrote: > Vladimir, if you feel that Peter's code cannot be used directly in IRA, > would you please explain why not? I think he already has explained, see http://gcc.gnu.org/ml/gcc/2008-04/msg00730.html Having looked at IRA a bit

Re: Security vulernarability or security feature? VU#162289

2008-04-29 Thread Ian Lance Taylor
"Robert C. Seacord" <[EMAIL PROTECTED]> writes: > The original impetus for this came from a check in a sprint() function > from Plan 9. Because of the API, there was no way to test if the len > was out of bounds, but the developers wanted to make sure they weren't > wrapping the stack on some a

Re: [RFC] Modeling the behavior of function calls

2008-04-29 Thread Andrew Pinski
On Tue, Apr 29, 2008 at 10:59 AM, Diego Novillo <[EMAIL PROTECTED]> wrote: > On 4/29/08 1:31 PM, Joe Buck wrote: > > > > Such a facility can have other uses, particularly for static analysis, > > by allowing simple preconditions and postconditions to be specified. > > For example: > > > > * a retur

Re: [RFC] Modeling the behavior of function calls

2008-04-29 Thread Diego Novillo
On 4/29/08 1:31 PM, Joe Buck wrote: Such a facility can have other uses, particularly for static analysis, by allowing simple preconditions and postconditions to be specified. For example: * a returned pointer is guaranteed to be non-null. * a supplied pointer is always dereferenced. * a suppli

Re: IRA for GCC 4.4

2008-04-29 Thread Mark Mitchell
Kenneth Zadeck wrote: Thanks, Peter. That was clever and email is very enlightening. I have analogous idea for more compact conflict matrix representation. I am currently working on bit matrix compression. It is not implemented yet. I hope it will be ready in a week. vlad, this seems

Re: [RFC] Modeling the behavior of function calls

2008-04-29 Thread Joe Buck
On Mon, Apr 28, 2008 at 03:04:56PM -0400, Diego Novillo wrote: > [ Apologies if this comes out twice. I posted this message last week, >but I think it was rejected because of a .pdf attachment. ] > > We have been bouncing ideas for a new mechanism to describe the behavior > of function calls

Re: Database for GCC

2008-04-29 Thread J.C. Pizarro
On Tue, 29 Apr 2008 08:16:14 -0500, "Tom Browder" <[EMAIL PROTECTED]> wrote: > A naive thought, perhaps: > > Would there be any advantage to using a key-value embedded database > program for the voluminous maps needed for gcc optimization, etc.? > > If so, consider

Re: IRA for GCC 4.4

2008-04-29 Thread Vladimir Makarov
Kenneth Zadeck wrote: Vladimir Makarov wrote: Peter Bergner wrote: On Mon, 2008-04-28 at 16:01 -0400, Vladimir Makarov wrote: Thanks, Peter. That was clever and email is very enlightening. I have analogous idea for more compact conflict matrix representation. IRA builds allocno live rang

Database for GCC

2008-04-29 Thread Tom Browder
A naive thought, perhaps: Would there be any advantage to using a key-value embedded database program for the voluminous maps needed for gcc optimization, etc.? If so, consider . I have used its predecessor, qdbm, for years and it was very fast. TC is faster

Re: Fwd: gcc cross compiler problem

2008-04-29 Thread Paul Brook
> I am running into a problem when I am trying to compile GCC to run on > a i686-pc-linux-gnu (host) but to build source code for target, > x86_64-pc-linux-gnu. I have build binutils first with the following > configure parameters: > --enable-plugin --with-cpu=generic --host=x86_64-pc-linux-gnu