RE: externs and thread local storage

2006-07-01 Thread Gary Funck
Mike Stump wrote: > > This sounds like a bug that should be fixed. You should only need > __thread on the extern if there was not a previous declaration for it. > The compiler seems pretty determined to enforce this restriction. Same result with 'const' instead of _thread: int const x; int mai

Re: externs and thread local storage

2006-07-01 Thread Mike Stump
On Jul 1, 2006, at 11:23 AM, Gary Funck wrote: To further complicate matters, if the program is rewritten into a single file as follows: int __thread x; int main() { extern int x; x = 5; } it will fail at compile-time with gcc 4.1: This sounds like a bug that should be fixed. You shou

Re: explaination of some gcc functions

2006-07-01 Thread Mike Stump
On Jul 1, 2006, at 12:54 AM, kernel coder wrote: I'm having trouble in understanding the term sequnce in an insn chain.get_insns() actually returns the current instruction. I'd recommend reading the code: /* Emission of insns (adding them to the doubly-linked list). */ /* Return the first in

Re: void* <-> char* aliasing rule, C standard or glitch?

2006-07-01 Thread Andrew Haley
Elmar Krieger writes: > > I searched hard, but couldn't determine conclusively if the C standard > allows to alias a void* pointer with a char* pointer. > > If that's not undefined behavior, then the following may be a glitch in > GCC 4.1.0 when compiled with -O2. > > Here's the ugly m

externs and thread local storage

2006-07-01 Thread Gary Funck
Consider the following program made up of two separate files: ==> file1.c <== extern int x; int main() { x = 5; } ==> file2.c <== int __thread x = 10; This will compile, link, and run on the IA64, but will fail at link time on AMD64: % gcc file2.c file1.c /usr/bin/ld: x: TLS definition in /tm

Re: void* <-> char* aliasing rule, C standard or glitch?

2006-07-01 Thread Steven Bosscher
On 7/1/06, Elmar Krieger <[EMAIL PROTECTED]> wrote: I searched hard, but couldn't determine conclusively if the C standard allows to alias a void* pointer with a char* pointer. Search in the GCC documentation, under -fstrict-aliasing: http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Option

gcc-4.2-20060701 is now available

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

void* <-> char* aliasing rule, C standard or glitch?

2006-07-01 Thread Elmar Krieger
Hi GCClers, I searched hard, but couldn't determine conclusively if the C standard allows to alias a void* pointer with a char* pointer. If that's not undefined behavior, then the following may be a glitch in GCC 4.1.0 when compiled with -O2. Here's the ugly minimal piece of code: /* ASSUM

Re: Notes of the libgcc-math BOF at the summit.

2006-07-01 Thread Christopher Faylor
On Fri, Jun 30, 2006 at 02:57:19PM +0200, Richard Guenther wrote: >Issues of providing both standard conforming and target optimized >math runtimes for GCC were discussed. Thanks for posting this. Since I wasn't able to attend the summit this year, I really appreciate seeing summaries like this.

Re: What happend to bootstrap-lean? (was: What happened to bubblestrap?)

2006-07-01 Thread Gerald Pfeifer
Hi Paolo, since we are approaching the GCC 4.2 release, I thought I'd point out the question of bootstrap-lean again, which is still documented and which I found rather useful in some settings. On Sat, 17 Dec 2005, Gerald Pfeifer wrote: > On Fri, 16 Dec 2005, Paolo Bonzini wrote: >> Yes. "make

Re: explaination of some gcc functions

2006-07-01 Thread kernel coder
I'm having trouble in understanding the term sequnce in an insn chain.get_insns() actually returns the current instruction.What does the term "sequence" mean,as the name suggests it must be a sequence of instructions ,but in an instruction chain,a single element will be an instruction ,then what i

Re: explaination of some gcc functions

2006-07-01 Thread Eric Christopher
kernel coder wrote: hi, I'm trying to understand the backend code of gcc for MIPS architecture.I'm having some trouble while understanding following functions. I think most of these are obvious, what problems in specific are you having with them? -eric