Suboptimal __restrict optimization?

2011-10-01 Thread Ulf Magnusson
Hi, Given the code class C { void f(int *p); int q; }; void C::f(int * __restrict p) __restrict { q += 10; *p = 7; q += 10; } g++ 4.5.2 with -O3 generates the following for C::f() (prologue and epilogue omitted): mov0x8(%ebp),%eax // eax = this (= &q) mov0xc(%ebp),%ecx // e

Re: C++11 atomic library notes

2011-10-01 Thread Andrew MacLeod
On 10/01/2011 02:55 AM, Marc Glisse wrote: "The compiler must ensure that for any given object, it either ALWAYS inlines lock free routines, OR calls the external routines. For any given object, these cannot be intermixed." Why? You give an example explaining why it is fine to link 386 and

gcc-4.7-20111001 is now available

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

Re: PR 36778: Should we have -Wfatal-warnings

2011-10-01 Thread Paolo Carlini
Hi, > > This isn't actually necessary, they just need to make their test harness a > bit > smarter. [snip] Fair enough, I'm going to close the PR as invalid with a link to your explanation. Thanks! Paolo