expression statements, volatiles, and C vs. C++

2010-03-05 Thread John Regehr
The question is, what should C and C++ compilers do with this code? volatile int x; void foo (void) { x; } This question is not totally stupid: embedded systems use code like this when reading a hardware register has a useful side effect (usually clearing the register). It is reas

Re: The scope of a for statement

2010-03-05 Thread Joe Buck
On Fri, Mar 05, 2010 at 02:40:44PM -0800, Magnus Fromreide wrote: > On Fri, Mar 05, 2010 at 12:06:01PM -0800, Joe Buck wrote: > > On Fri, Mar 05, 2010 at 11:38:23AM -0800, Magnus Fromreide wrote: > > > Hello. > > > > > > I tried to do > > > > > > for (;; ({ break; })) > > > printf("Hello\n"); >

Re: The scope of a for statement

2010-03-05 Thread Magnus Fromreide
On Fri, Mar 05, 2010 at 12:06:01PM -0800, Joe Buck wrote: > On Fri, Mar 05, 2010 at 11:38:23AM -0800, Magnus Fromreide wrote: > > Hello. > > > > I tried to do > > > > for (;; ({ break; })) > > printf("Hello\n"); > > > > and got an error message: > > > > error: break statement not within loo

Have you tried Cooliris?

2010-03-05 Thread mercy
Hi there, I've been using Cooliris and thought you might be interested in it too. Cooliris makes searching and viewing photos and videos on the Web so much faster and more fun. It turns your browser into an ever-expanding "3D Wall" whenever you launch it from your browser toolbar. It's really

Re: The scope of a for statement

2010-03-05 Thread Joe Buck
On Fri, Mar 05, 2010 at 11:38:23AM -0800, Magnus Fromreide wrote: > Hello. > > I tried to do > > for (;; ({ break; })) > printf("Hello\n"); > > and got an error message: > > error: break statement not within loop or switch But it only got through the parser, so that this error message co

The scope of a for statement

2010-03-05 Thread Magnus Fromreide
Hello. I tried to do for (;; ({ break; })) printf("Hello\n"); and got an error message: error: break statement not within loop or switch when compiling it as C. Given that 9899:1999 §6.8.6.3 says that a break statement only shall appear in or as a switch or loop body that is expected.

Re: Use the wctype builtins functions

2010-03-05 Thread Joseph S. Myers
On Fri, 5 Mar 2010, Ian Lance Taylor wrote: > Dave Korn writes: > > > I think you'll probably have to use plain old iswalpha. Looking at > > opts.c, > > I'm guessing you're trying to extend the help string format to allow > > unicode? > > Note that it may be OK to use iswalpha strictly on

Re: Definition of an instruction

2010-03-05 Thread Jean Christophe Beyler
Yes, I should have thought about it too. The error message threw me a bit off, thanks for clearing that. Thanks for that ! Final question about this all: I have a cost adjustment to make if the register operand 0 is used later on. Basically, if that one is used, I have a +6 cost otherwise if it's

Re: Use the wctype builtins functions

2010-03-05 Thread Ian Lance Taylor
Dave Korn writes: > I think you'll probably have to use plain old iswalpha. Looking at opts.c, > I'm guessing you're trying to extend the help string format to allow unicode? Note that it may be OK to use iswalpha strictly on command line options, but using it anywhere else gets you into a se

Re: Passing compiler option to bootstrap compiler

2010-03-05 Thread Andreas Schwab
"Paulo J. Matos" writes: > How can I configure gcc and tell it to pass a specific option to the > bootstrap compiler? http://gcc.gnu.org/install/build.html Andreas. -- Andreas Schwab, sch...@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for somet

Passing compiler option to bootstrap compiler

2010-03-05 Thread Paulo J. Matos
Hi, How can I configure gcc and tell it to pass a specific option to the bootstrap compiler? -- PMatos

Re: Handling of builtins

2010-03-05 Thread Paulo J. Matos
On Wed, Mar 3, 2010 at 10:17 AM, Richard Guenther wrote: > > They are complementary.  The fold_ variants are for simplifications > throughout tree passes while the expand_ variant translates > builtin calls to target-specific RTL (with falling back to libcalls). > Thanks Richard, that's exactly w

Re: Use the wctype builtins functions

2010-03-05 Thread Dave Korn
On 05/03/2010 02:32, Shujing Zhao wrote: > Hi, > > I want to use the the wctype builtins ISWALPHA and the other ISW* > functions to handle the wide character string, but I get the following > error: > > /home/gcc/build/gcc/../../trunk/gcc/opts.c:1190: undefined reference to > `ISWALPHA' > collect

Re: Idea for Google Summer Code : C Compiler for EFI Byte Code implement in gcc

2010-03-05 Thread Andrew Haley
On 03/04/2010 07:27 PM, b95705...@ntu.edu.tw wrote: > 引述 Andrew Haley : > >> There is no reason in principle this shouldn't be part of gcc. >> >> I think no-one has responded yet because they don't know what it would >> be for, and how much work it would involve. > > What compiler doing is: c ->