Built-in function question

2011-10-26 Thread Zoltán Kócsi
I came across some very interesting behavior regarding to built-in functions: int __builtin_popcount( unsigned x ); is a gcc bult-in, which actually returns the number of 1 bits in x. int foo( unsigned x ) { return __builtin_popcount( x ); } generates a call to the __popcountsi2 f

Re: Built-in function question

2011-10-26 Thread Ian Lance Taylor
Zoltán Kócsi writes: > However: > >int (*bar( void ))( unsigned ) >{ > return __builtin_popcount; >} > > returns the address of the label "__builtin_popcount", which does not exist: > >int main( int arcg, char *argv[] ) >{ > (void) argv; > return (*bar())( ar

Potentially merging cxx-mem-model with mainline.

2011-10-26 Thread Andrew MacLeod
I'd like to have the cxx-mem-model branch considered for merging with mainline before we end stage 1 for GCC 4.7. What it is == GCC has had the __sync built-ins for atomic operations for a number of years now. They implement a "sequential consistent" (AKA seq-cst) synchronization mod

Re: Potentially merging cxx-mem-model with mainline.

2011-10-26 Thread David Gilbert
On 26 October 2011 16:38, Andrew MacLeod wrote: > I'd like to have the cxx-mem-model branch considered for merging with > mainline before we end stage 1 for GCC 4.7. > > What it is > == > > GCC has had the __sync built-ins for atomic operations for a number of years > now.  They implement

gnat cross compilation

2011-10-26 Thread BELBACHIR Selim
Hi, Is it possible to compile a gnat cross compiler based on gcc 4.5.2 using my pre-installed gnat native compiler based on gcc 3.4.6 ? Or should I try to build my own local native compiler based on gcc 4.5.2 ? I ask the question because for the moment, I'm stuck with the following erro

Re: Potentially merging cxx-mem-model with mainline.

2011-10-26 Thread Benjamin Kosnik
> Whats left > === > Functionality is pretty much complete, but there are a few minor lose > ends still to deal with. They could be done after a merge, in the > next stage, or required before... you tell me :-) > > - potentially implement -f[no]-inline-atomics (to never produce > inline

Re: Potentially merging cxx-mem-model with mainline.

2011-10-26 Thread Joseph S. Myers
On Wed, 26 Oct 2011, Andrew MacLeod wrote: > Whats left Out of interest, do you have any plans for the C1X side of things (_Atomic, stdatomic.h etc.)? That would of course be for 4.8 or later. -- Joseph S. Myers jos...@codesourcery.com

Re: ARM Linux EABI: unwinding through a segfault handler

2011-10-26 Thread Paul Brook
> >> So, suggestions welcome. Is there a nice way to detect a signal frame? That just makes me ask why are you're trying to detect a signal frame in the first place? > > Libunwind also reads the IP to detect signal frames on ARM Linux: > > http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=b

tree-ssa-strlen vs. zero-length strings

2011-10-26 Thread Ian Lance Taylor
The file tree-ssa-strlen.c causes several warnings when compiling the Go library. The warnings look like: ../../../gccgo2/libgo/go/http/transport.go: In function ‘http.String.pN29_libgo_http.http.connectMethod’: ../../../gccgo2/libgo/go/http/transport.go:437:1: warning: offset outside bounds of

Re: gnat cross compilation

2011-10-26 Thread Arnaud Charlet
> Is it possible to compile a gnat cross compiler based on gcc 4.5.2 > using my > pre-installed gnat native compiler based on gcc 3.4.6 ? Or should I try > to > build my own local native compiler based on gcc 4.5.2 ? You needed a matching native compiler first in order to build