Edit-and-continue
To my knowledge, GCC does not currently support any edit-and-continue abilities. Is this still true? And if so, are there any plans to introduce it at some point? - Rick C. Hodgin
Re: Edit-and-continue
Ian, The idea is to create a program database of the compiled program on a full compile. Then when asked to re-compile with the edit-and-continue switch, it only looks for changed code and compiles those few lines. Everything else it needs to carry out compilation is there from previous full-compile as was originally parsed, or from subsequent edit-and-continue compiles which updated the database. The resulting changes are passed to gdb for insertion into the running program's memory in real-time. On Sun Jul 18th, 2010 2:45 AM EDT Ian Lance Taylor wrote: >Rick Hodgin writes: > >> To my knowledge, GCC does not currently support any edit-and-continue >> abilities. Is this still true? And if so, are there any plans to introduce >> it at some point? > >I don't see how it makes sense to add edit-and-continue to gcc. >Compilation times are too slow, but they aren't *that* slow. Are you >thinking about gdb? Or the linker? > >Ian
Re: RFC: -Wall by default
An idea whose time has come. --- On Wed, 4/4/12, Gabriel Dos Reis wrote: > For GCC-4.8, I would like to turn on -Wall by default. > Comments?
Switch statement case range
What are the possibilities of adding a GCC extension to allow: switch (foo) { case 1: case 2: case 3 to 8: case 9: default: } in C/C++ case statements? Best regards, Rick C. Hodgin
Re: Switch statement case range
Thank you! I'd like to find out some day exactly how much I _don't_ know. :-) Best regards, Rick C. Hodgin --- On Sun, 4/8/12, Marek Polacek wrote: > From: Marek Polacek > Subject: Re: Switch statement case range > To: "Rick Hodgin" > Cc: "gcc" > Date: Sunday, April 8, 2012, 12:05 PM > On Sun, Apr 08, 2012 at 08:59:46AM > -0700, Rick Hodgin wrote: > > What are the possibilities of adding a GCC extension to > allow: > > > > switch (foo) { > > case 1: > > case 2: > > case 3 to 8: > > case 9: > > default: > > } > > This already exists (and is a GNU extension): > > switch (foo) > { > case 1: > break; > case 3 ... 8: > break; > default: > break; > } > > Marek >
Re: Switch statement case range
As comprehensive as that list is (and it is indeed quite impressive), it is yet a small subset I assure you. LOL! :-) I have to be honest ... the more I learn about GCC the more impressed I am. I think it is, without a doubt, the best GNU project in history. Has there ever been any talk of nominating Richard Stallman for the Nobel Peace Prize (seriously)? Best regards, Rick C. Hodgin --- On Sun, 4/8/12, Oleg Endo wrote: > From: Oleg Endo > Subject: Re: Switch statement case range > To: "Rick Hodgin" > Cc: "Marek Polacek" , "gcc" > Date: Sunday, April 8, 2012, 12:14 PM > On Sun, 2012-04-08 at 09:07 -0700, > Rick Hodgin wrote: > > Thank you! > > > > I'd like to find out some day exactly how much I > _don't_ know. :-) > > > > Knock yourself out ;) > http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html > > Cheers, > Oleg > >
Re: Switch statement case range
I was wondering if anyone had a response to this? No one responded on- or off-list, which was both surprising and confusing. Thanks! :-) Best regards, Rick C. Hodgin --- On Sun, 4/8/12, Rick Hodgin wrote: > From: Rick Hodgin > > ...I think [GCC] is, without a doubt, the best GNU > project in history. > > Has there ever been any talk of nominating Richard Stallman > for the Nobel Peace Prize (seriously)? > > Best regards, > Rick C. Hodgin
Re: Switch statement case range
--- On Fri, 4/13/12, Jonathan Wakely wrote: > > I was wondering if anyone had a response to this? No > > one responded on- or off-list, which was both surprising > > and confusing. > Why? What sort of response were you expecting? I didn't have a particular expectation (outside of just some kind of response). :-) > What has GCC or GNU got to do with "fraternity between > nations, for the abolition or reduction of standing armies > and for the holding and promotion of peace congresses"? Well, GCC is part of GNU. GNU is of the Free Software Foundation. The FSF was started by Stallman on principles which were contrary to seemingly fundamental mindsets of the time (and today). His was an ideology organized into a specific thing thta grew into far more than I think even he envisioned. The off-shoots of his creation are powering the world's economy today, powering virtually every machine ever built (at least as an option to do so). Were it not for free software, our world would be markedly different in 2012. Now, specifically to GCC, Linux is built on it. Stallman initially wrote the compiler, debugger, etc., and in so doing got the ball rolling. He's since moved on to the more philosophical end regarding software patents, intellectual property, and the need for free software on principles. He's also devoted his life pretty much exclusively toward this end since 1983/4. > More to the point, RMS hasn't added code to GCC for many years, > it's been the work of lots and lots of others for years. > Where's my nobel prize? Free Software exists as it does today because of Stallman. And I wasn't suggesting RMS get the Nobel Prize for GCC, or even specifically for GNU, but rather for the ideology and philosophical contributions to the world the FSF has created. His initial contributions to all of those (then) fledgling efforts which have panned out into a diverse machine encompassing millions of developers world-wide. Is it not single greatest humanitarian effort begun by a person with an ideological philosophy? His is of such a creation, offered up unto humanity in a way which is unlike other efforts, one where the free labor of literally millions of people across the globe, their skills, their talents, the best they have to offer in many cases, is literally handed over to everyone else for free. And the philosophy behind the GPL ensures that those offerings cannot be retracted at a future date. The Nobel Prize honors people who have changed the world in positive ways, contributing something which makes human life better. RMS has done that with the FSF, GNU in general, and also its offerings (like GCC, surely the fundamental backbone of nearly all free software in existence). I don't think it would be out of line at all to consider the ramifications RMS has had upon this world. He has maintained his vision to free software (and not open source) all along, because he believes and pushes that the right to BE ABLE to share and to have the contributions of your neighbors (both near and far) added to prior work by yourself and others is paramount to having a great society. What better type of improvement is ther than to take the work of millions and offer it for billions to use or improve upon (should they choose)? Name another endeavor piloted by a single individual, especially one which has faced such staunch and continuous opposition at every point, which has then reached such a scope as to touch literally billions of lives, giving every one of them the chance to improve what they have today (should they choose to do so). I'm simply not aware of any efforts of similar scope. Best regards, Rick C. Hodgin
Add corollary extension
I'd like to add an inverse definition to an existing BOOL/bool type, one which the compiler is natively aware of. Example: bool isSystemOpen; I can reference this in the manner in which it's defined: if (isSystemOpen) if (!isSystemOpen) However, there are times when it's more desirable to reference it in the opposite manner as it makes more logical sense to humans. The compiler is aware of the boolean nature of that variable, so I would like to be able to create a new form which is aware of the inverse boolean condition natively. Example syntax: bool isSystemOpen[.isSystemClosed.]; This new syntax creates one physical variable, and two logical ways to reference the same variable in memory, but always tests for the inverse condition correctly, such as: if (isSystemClosed) Which would be the same logically as: if (!isSystemOpen) Any ideas on how to best / easily implement this? :-) I had the idea of just writing a pre-processor to look for those references and swap them out with the opposite condition. But it seems GCC should be able to do this natively. Thanks. Best regards, Rick C. Hodgin
Re: Add corollary extension
> Why do you want to bother with a non-standard, > unportable extension instead of just writing: > > inline bool isSystemClosed() > { return !isSystemOpen; } > > Which is simple, conventional, easy to understand > and portable. > > Or in C++ just define a suitable type, instead of > needing changes to the core language: > > struct inv_bool { > bool& b; > operator bool() const { return !b; } > }; > > inv_bool isSystemClosed = { isSystemOpen }; There are certain fundamentals in data processing. The inverse bool is one of them. Why not be able to reference it more naturally in code utilizing something the compiler already knows about and can wield effortlessly? I've thought more about the syntax, and I see this making more sense: bool isSystemOpen[!isSystemClosed]; As the inverse bool relationship is fundamental in software, I hope this will become a C/C++ standard. Best regards, Rick C. Hodgin