Slashdot Mirror


GCC 2.95 Released

sparky writes "The GNU Compiler Collection (GCC) 2.95 is available ."> here [Ed: Please use a mirror]. This is the first release of GCC since the EGCS steering committee took over, and a major step on the way to GCC 3.0. " Interesting to see we have a new ANC (acronym name change).

206 comments

  1. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 0

    Face it. Aliasing problems will always be a problem with C/C++, and in general, any language which relies so heavily on pointers. There are alternatives. All of them are unrealisitic for the kernel due to political and cultural considerations. For example, Ada is one of the best languages for systems programming because of its speed and ability to safely offer fine control over bit-twiddling and low-level operations. A Linux kernel rewritten in Ada would be awesome and damn near bullet proof. But it will never happen.

  2. Re:pgcc -> gcc? by Jonas+�berg · · Score: 2

    If I understand the situation correctly, pgcc is basically a set of patches against egcs/gcc. A lot of the code from pgcc should make its way into gcc eventually, although I believe that some parts can't be included, such as those written by Intel. That's because the copyright for changes to GCC must be assigned to the FSF, and Intel seems unwilling to do so.

  3. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 2

    "Oh, your 2.2 kernel crashed. Did you compile it with egcs?"

    That is a common question on linux-kernel. Yes, the code was cleaned up in this respect. But nevertheless, noone guarantees you that an egcs compiled kernel will work. I still use gcc 2.7.2.3 on production boxes for kernel compiles.

    The difference between egcs and gcc 2.95 is that Mark's aliasing framework is turned on by default. There have been some heavy debates about this on the kernel mailing list and apparently the communication between the egcs team and Linus was not very successful :-/

  4. Re:pgcc -> gcc? by Jonas+�berg · · Score: 2

    I stand corrected then; than you for the information.

  5. why dhcpcd and not pump? by Anonymous Coward · · Score: 0

    pump seems fine here. why do you suggest this?

    -matt

    1. Re:why dhcpcd and not pump? by Trick · · Score: 1

      WAY off-topic...

      The first version of pump released with Red Hat 6 had trouble with Windows NT DHCP servers.

      Either way, the updated RPM ought to fix any weirdness that could potentially crop up.

  6. Re:Chill support by Anonymous Coward · · Score: 0

    Until a better answer comes up, it's a technical language (once) used in the telecommunications sector. Here is a site, it is in English, although the server is in Germany. Hope it helps for a start. CHILL

  7. Why not use this for Stampede Linux? by tomk · · Score: 1

    Would there be any issues with Stampede Linux (or RedHat, etc) building the binaries in their distro with Code Fusion?

    'Course, they couldn't distribute Code Fusion itself, but if it is fully compatible with gcc-2.95, that wouldn't seem to be much of a problem. Just that binaries the user compiles themself won't be as fast.

    -Tom

  8. Re:No, C++ appeals to people who understand OO by Anonymous Coward · · Score: 0

    Trust me. I *understand* O-O. C++ isn't even close to appealing. There are *so many* O-O languages that are better than C++, the fact that anyone uses it at all is amazing.

    What are C++'s advantages over Eiffel? Over Ada95? I can think of exactly one: backward compatibility with C (and, in fact, many people who call themselves C++ programmers don't know anything about C++; thet just use a C++ compiler on their C code), and that's more of a burden than a blessing. Programming languages really *have* come a long way in the past three decades. But everyone insists on using the worst possible languages: Fortran, C, C++. Lame, lame, lame.

  9. Another Slashdot thing by Anonymous Coward · · Score: 0

    At the time someone announced the availability of gcc 2.95 at the GNU mirrors, it WASN'T available at the EGCS ftp site, nor their site was showing that gcc 2.95 is the actual release. If you checked the EGCS ftp site, the archives were without read access. Stop publishing this sort of notices. First because this is for freshmeat and second because it was OFICIALLY released later. Too bad a bug wasn't discovered before Cygnus release gcc 2.95.

  10. Re:Hm... by jacobm · · Score: 1

    That's pretty harsh.
    On the other hand, it IS true that there is a learning curve to STL, and once you get to the top of that curve, it becomes quite a bit easier to use STL than to make your own versions of everything, because it is really likely that the STL list class, for instance, is more flexible, more robust, and more efficient than the list that you would write in 30 minutes or an hour. While it probably won't be as intuitive for you at first, a little perserverence is all it takes. For a good STL starting point, check out SGI's documentation. It's pretty good.
    To keep this at least somewhat relevant, I think that despite all of the language-theory arguments against C++, STL and the extremely wide support of C++ practically everywhere make it really useful to know. Is it the best language possible? No. Is it the best language right now? Depends on who you are and what you want to do.

    <ASIDE>
    Someone in this thread mentioned hash maps losing data- sounds very much like a comparator problem. Whoever had that problem should make SURE that the hash map has a working comparator. In my experience, 95% of hash map problems turn out to be a broken comparator.
    To see if that's the case, you can check to see what's in your hash map with a simple snip of code. Assuming you've typedef'ed your hash map's type as "hash_type":

    hash_type::iterator i = hash.begin();
    while (i != hash.end())
    {
    cout << "Key: " << *i.first() << endl;
    cout << "Value: " << *i.second() << endl;
    i++;
    }

    </ASIDE>

    --
    -jacob
  11. Re:STL is one of C++'s pluses by jacobm · · Score: 1

    I agree that the utility of both Swing and STL are hindered by their sometimes awkward syntax. Those two pieces of technology in particular really make me tend to think that the "language of the future" will use first-class functions. After all, Swing's anonymous interface-implementors are just make-believe first-class functions, and the same is true of the function-objects that you have to use in STL. It seems that both of those areas highlight the fact that if you want to have a useful collection of generalized data, you sometimes need to be able to plug in an arbitrary algorithm just as much as you need to be able to plug in an arbitrary datum. From there, first-class functions are a short step. They'd go a long way towards cleaning up the mess that STL (and Swing too, to a lesser extent) can sometimes be.

    On the other hand- STL is STILL easier than the alternative, writing your own hash table for every new data type you need to keep in a hash and every possible key you could store that data with. Digging through levels of templates is bad, but you probably don't have to if you want to debug an STL class: in all of my experience with STL, I have never found a serious bug that didn't ultimately turn out to be my own fault. For example, I have certainly had my fair share of data-losing hash maps, and I've learned that you should always look extremely closely at your comparator before you start scouring the STL code and cursing about the library programmers and how they somehow released a hash table that randomly loses data (though I freely admit to jumping directly to step 2 myself- it makes it all the more humiliating later when somebody points out that I'm using '=' instead of '==' or something =]).

    --
    -jacob
  12. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

    > Because you can only write an emulation of currying with much template hacking and trouble,
    > should I conclude that it is far inferior to functional programming languages

    Yes! :-)

    ML will rule the world! you'll see.

  13. Re:AMD K6? by Espy · · Score: 1

    -mcpu=k6 and -march=k6 are new in gcc 2.95

  14. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 3
    There have been some heavy debates about this on the kernel mailing list and apparently the communication between the egcs team and Linus was not very successful :-/

    Linus is a great guy and all that. But he has some blind spots. Among them are Quality and Engineering issues. He just does not have the background or experience to make good judgements in these areas. He lacks a humility which would tell him that he is not an expert in all areas of computer science. What we are starting to see is that his lack of expertise in some areas has hindered Linux's ability to scale well across architectural and performance bounderies. In other words, the kernel is becoming more and more complex and Linus is unfamiliar with the technologies which could address these issues. And worst of all, he appears to be unwilling to learn.

  15. Re:Sterring. Rhymes with herring. by Jonas+�berg · · Score: 3

    I'd recommend browsing Slashdot with Lynx and using Emacs or some other
    such editor to edit text inputs. It's all very sweet because using an
    external editor makes it so much easier to run ispell.

  16. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

    "C++ and other OO languages have been proven to be more efficient for programmers on projects larger than 100k lines."

    You forgot to provide a link to this "proof" or any cites. Please provide sufficient details for us to determine how loosely you use the word "proof".

  17. School's out for the summer by Anonymous Coward · · Score: 0

    Guess what's funnier... you just proved his point. The most pathetic thing here is your apparent lack of intellect, rationality, and ability to be objective. Furthermore, why can't cretins of your ilk ever spell?

    Stop watching Star Trek and leave the house for a change!

    Anonymous Spanker

  18. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 1

    For most projects, switching to C++ would probably be less of a benefit than writing the *C* code correctly. :-/ Programming in an object-oriented language is sometimes useful..many benefits (including interfaces) of object-orientation, however, can be had in a non-OO language with little or no trouble. Only inheritance is hard to emulate.

    The other thing about C++ is the STL. Don't even make me talk about the STL, I just tried to use it in a program and I'm now trying to remove all references to it..it's baroque, buggy, and poorly defined. For starters. (among other things -- my hash tables keep 'forgetting' about entries. I insert an entry with key "foo" into the table. Shortly afterward, I try to extract the entry from the table. Surprise! It's not there! Argh... Oh, and the default hash function knows about char *s, but the default hash EQUALITY routine just compares addresses!!)

    Daniel

  19. Java != OO? by Anonymous Coward · · Score: 0

    If Java isn't object-oriented I don't even wanna try Smalltalk. I don't think making everything OO is a good thing. Doing even simple things in Java can be a pain because of the forced OO-style. C++ is much better.

    1. Re:Java != OO? by bt · · Score: 2

      I think it depends on the project. In some places Java speeds up the process of coding because so much is abstracted. And smalltalk can speed it up even more (although I'd use Java or C++ before Smalltalk), but don't waste your time with "Hello world!" and trivial stuff like that in Smalltalk...

  20. Re:Backward compatibility? by Anonymous Coward · · Score: 0

    Egcs works with libc5 / 2.0.x. I don't know about the new GCC but I think I'll try.

  21. GCC and Ritchie's compilers by ajs · · Score: 4

    It's great to see the full span of history, here. The previous article was Ritchie releaseing code for the first C compilers and this one is GCC 2.95 which is the culmination of at least 15 years of work on the part of Stallman, FSF, Cygnus and probably tens of thousands of volunteers. For those who are looking to advocate Open Source within their companies, or just see for yourself what this "new" paradigm can produce, please read the GCC source! It's some of the best code I've ever seen (though I admit it has it's... blemishes). The way it achives platform neutrality while producing highly platform-optimizied code is genius, and you can really feel its roots (the intermediate language is a compromise between Stallman's love for LISP and a desire to keep compilation fast and efficient). This is all without going into the fact that there are now front-ends for every major programming language with the exception of the purely interpreted ones (Perl, Python, TCL, etc).

    Currently, as far as I am aware, this is the finest compiler on the face of the Earth, and I dare someone to prove it wrong. There are compilers that produce faster code for a specific platform, and there are compilers for languages that GCC has never heard of, but GCC wins the all-around best technology (IMHO) for producing native instructions from your pet language. It's the one tool which I feel justifies all of Stallman's quirkiness, and gives me faith in the future of Open Source.

    1. Re:GCC and Ritchie's compilers by Trepidity · · Score: 2

      How is pgcc "better" than gcc when it won't even compile PPC code?

    2. Re:GCC and Ritchie's compilers by demon · · Score: 1

      He's not saying better for EVERY processor, just specifically for Pentium and better (?) Intel CPUs and other similar CPUs (I'm guessing on the latter account)...

      --

      Sam: "That was needlessly cryptic."
      Max: "I'd be peeing my pants if I wore any!"
    3. Re:GCC and Ritchie's compilers by Anonymous Coward · · Score: 0

      I work at a major ISV. I worked with Unix guy trying to port some software to AIX. He was using gcc. At FIRST I thought to myself, "This guy's an IDIOT. Just have the company buy him a copy of Visual Age C++ for AIX!"

      After working with gcc for a while, NOW it all makes sense. If you're gonna support more than one commercial *nix, you can't BUY a compiler that supports every commercial *nix. (Or can you? I might be wrong) I imagine that most companies supporting several versions of Unix use gcc at least for prototyping.

    4. Re:GCC and Ritchie's compilers by Anonymous Coward · · Score: 0

      IBM VisualAge C++ 4.0.

      Incremental compiling RULES.

    5. Re:GCC and Ritchie's compilers by JoeBuck · · Score: 4

      As a member of the gcc/egcs steering committee, I would be very happy if, in fact, GCC were "the finest compiler on the face of the earth". It isn't. It is the most widely ported compiler, and it's decent enough, but many other compilers beat it for code quality.

      gcc 2.95 still isn't that great on Intel-compatible processors. The good news is that we finally have a new IA32 back end, produced by Cygnus under contract, that has been donated; we'll finally have enough accuracy to do instruction selection and scheduling properly. It will be in gcc 2.96 (or whatever we call it). Until then, pgcc will be better (I believe that the new back end beats pgcc at least most of the time).

    6. Re:GCC and Ritchie's compilers by Anonymous Coward · · Score: 0

      ?!?

      I thought it's best to write so that it the source compiler independent. Don't ANSI-standards exist for C and C++?

  22. Re:Performance of compiled binaries compared to pg by Anonymous Coward · · Score: 0

    I think some of the source changes in pgcc rendered gcc pentium-only but most of them are in the main source tree of egcs. If you're only using pentium, the latest pgcc will probably be better.

  23. Re:Sterring. Rhymes with herring. by ajs · · Score: 2

    Shouldn't it be trivial (with ispell's "-a" mode) to write a web-based interface to integrate with things like Slash?

  24. Are other Linux C++ compilers threadsafe? by Anonymous Coward · · Score: 0

    Speed is one thing, but last time I checked only egcs/gcc had threadsafe exception handling.

    Anything change in the last year?

    A compiler that produces non-threadsafe code is of no use to me.

  25. Microsoft decline by Scurrilous+Knave · · Score: 1

    Are you saying that you think Microsoft has the same level of respect and admiration among their customers that they had in, say, 1993? They've been in a decline since about 1995--I maintain that they peaked at about the release of Win95, and have been on a downward trajectory ever since. Oh, it was slow at first, manifested in small ways, but it's accelerating every day. No, it hasn't been reflected in their stock prices or earnings yet, but that's only a matter of time. You can't keep customers forever when everyone thinks you are scum.

    1. Re:Microsoft decline by unitron · · Score: 1

      Or when you treat your customers as scum.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

  26. Huray! Now, more people use C++!! by FunOne · · Score: 0

    Yea, new compiler. But, it would help if more projects would make the change to C++.


    FunOne

    --
    FunOne
    1. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      What? Why should everyone use C++? It's not like
      C++ is an improved version of C, it's an object
      oriented language... they both have their own
      uses.

    2. Re:Huray! Now, more people use C++!! by NaCh0 · · Score: 1
      C++ is actually a very nice language if you avoid the standard pit-traps (which are many).

      Windows NT is a very nice OS too, if you avoid the standard pit-traps (which are many).

    3. Re:Huray! Now, more people use C++!! by ajs · · Score: 1
      C++ is useless trash. People who know better avoid it like they do the plague.

      Not fair or true. There are plenty of people who "know better" and don't avoid the language. C++ is actually a very nice language if you avoid the standard pit-traps (which are many).

      For example, I recommend avoiding multiple inheiritance (the only thing that I think Java got right), references, templates, run-time type checking, public data members, unplanned parenthood (e.g. what most people call reuse, and are shocked to find slows projects down), and most of all operator overloading (I'm still stunned by the sheer stupidity of overloading If you avoid these constructs you will soon find that any C effort could be sped up several-fold by the addtion of polymorphic function signatures, single inheiritance, namespace separation, data hiding and the (slightly) improved memory management.

      Now, all I need is something that gives me the speed and low-level handling of C++ plus the high-level abstractions of Perl. For now, I will have to resign myself to calling C++ from Perl using XS.

    4. Re:Huray! Now, more people use C++!! by slambo · · Score: 1

      -----quote-----
      C++ is useless trash. People who know better avoid it like they do the plague.
      -----end quote-----

      Um, no. If your statement is true, then a myriad of proggies and libs that we know and love (e.g. Linux, Gimp, Apache, Samba, Sendmail, Gtk+, Qt, etc. and then everything built on top of them) might not exist. At least they wouldn't exist in the form that we know them now.

    5. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0
      Why? C++ is useless trash. People who know better avoid it like they do the plague.

      The Truth that dare not speak its name! Heh Heh. Don't you know that C++ has the same appeal as Windows? You know, low reliability, baroque constructs, complex obscurity? Don't you know that C++ appeals to the same people as Windows? Those people who get there jollies by memorizing how to hold your mouth right when contructing a virtualized overloaded whatsit pure destructor?

      Open minded software personel owe it to themselves to read The C++ Critique. It's a real eye opener on how we all have been bamboozled by the C++ buzz.

    6. Re:Huray! Now, more people use C++!! by Johan+Veenstra · · Score: 1

      > Argh... Oh, and the default hash function knows > about char *s, but the default hash EQUALITY > routine just compares addresses!!)

      From an OO perspective, that is 'equality'. Two
      objects that happen to contain the same
      information, are still two different objects,
      and thus not equal.

      Johan Veenstra

    7. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      >> Anyone who thinks that STL is useless...
      You mean, useful?

      Anyway, you can't blame the language for a bug in an implementation.

    8. Re:Huray! Now, more people use C++!! by jacobm · · Score: 1
      No, I meant what I said. The only way to do generic types for a container in C/C++ without templates (afaik) is by casting a pointer to what you want to store to a void * when you put it into the container, then casting back to a (whatever) * when you take it out. However, C++ won't (and can't) ever check, not even at run-time, to see whether the void * that pop() returned really is an int *, like your cast asserted, or in fact a SuperComplicatedObject *, like it was when you inserted it. That means that you can manufacture huge headaches for yourself, not the least of which are the fact that C++ will happily figure out for you what your SuperComplicatedObject would have been if it were an int, so you'll just see the problem as bizarre run-time behavior that you can't figure out.

      If you use STL, you'll try to compile your program, and it will say:

      gcc: error in myFabulousProgram.cc line 85: You can't assign an int * the value of a SuperComplicatedObject * without an explicit cast, you bonehead!

      Which is a whole lot better.

      Templates are good. Void pointers are evil. Think of them as Obi-Wan Kenobi and Darth Vader, respectively.
      --
      -jacob
    9. Re:Huray! Now, more people use C++!! by VonKruel · · Score: 1

      You're quite right that it's easier to write inefficient code in C++. There can be methods invoked where the coder doesn't expect, yielding correct behavior and yet crippling performance.
      Ironically, for the same reason it's easier to write more efficient code as well, since complex data structures can be used with a minimum of effort. So it comes down the the coder's skill -- you'll tend to see greater extremes of *great* and *horrible* code in C++.

      The biggest gains are from using better *algorithms*. E.g. going from O(n^2) to O(n) is going to matter a lot more than a constant 5-10% gain.

      Most of the time it's only about 20% of the code in a project that needs to be fast. Profiling can help you identify that 20% and get it up to speed.

    10. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      "Um, no. If your statement is true, then a myriad of proggies and libs that we know and love (e.g. Linux, Gimp, Apache, Samba, Sendmail, Gtk+, Qt, etc. and then everything built on top of them) might not exist. At least they wouldn't exist in the form that we know them now."

      Please elaborate, I'm sure you can't think that all these were written in C++, so why do you feel that they might not exist if people avoided C++?

    11. Re:Huray! Now, more people use C++!! by ucblockhead · · Score: 1

      I'd agree with all that with the exception that the templates in the STL are incredibly useful and ought not be avoided.

      Templates themselves are wildly useful, it is just that you really have to know what you are doing to get anything positive out of them. I'd say, don't use templates unless you understand exactly how the STL works, and then only use them if you can't do the same thing easily without them.

      Operator overloading should only be used in certain cookie cutter ways. Creating '>' operators for io in a new class. Creating an assignment operator for a new class. That sort of thing.

      IMHO, most of the "problems" of C++ come from people who overuse inheritance . Huge inheritance hierarchies are nearly always a mistake. Much better are a bunch of smaller, completely independent classes. (You know, "modularity", that thing they told you was good in school.)

      The other mistake is going in expecting something like Smalltalk and then getting pissed because it is not. Part of the whole point of C++ is that you don't have to make every single line of code object-oriented. I know that is heresy for many OO types, but in the real world it is damn useful to have a language that is OO when you want it, but only when you want it. That is why C++ is so much more popular then languages that enforce OO.

      Personally, I think anyone coding in C should switch to C++ even if they aren't going to go OO. C++ has some extensions over C that allow you to improve structured programs as well. Just remember that typing "g++" does not mean you have to start the project with "class Object".

      --
      The cake is a pie
    12. Re:Huray! Now, more people use C++!! by ucblockhead · · Score: 1

      I once did a real world project in a OO fashion using only C as a test and while it was certainly possible, it was certainly much more work. The program worked well, was (IMHO) fairly easy to maintain, blah, blah, blah, but I could have easily written a similarly good C++ program in about 1/3 the time, and it would have been even more easy to maintain.

      --
      The cake is a pie
    13. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 1

      Being a C++ programmer myself, I partially agree with the C++ critique you mention. The article has many good points. Unfortunately you forgot to mention that the main point of criticism in this article is C++' close relationship to C.

      While being ugly from an OO point of view, the backwards compatibility with C has huge advantages for real world programming since many libraries are still written in C. And it helps the open-minded of the crowd of C programmers to upgrade slowly to more modern techniques.

      Strange alliances here in this tread. On the left side you have the pure OO-people who think C++ is too C-ish, on the right side you have the C hackers who think C++ is too much of a high-level language. In the middle there are we: the poor pragmatic C++ programmers who actually write most of the exiting software these days ;-)

    14. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Gimp was before, it was translated to C after there was a proof-of-concept. GTK+ is the C++ wrapper for GTK.

      only ones I know about

      (a different AC)

    15. Re:Huray! Now, more people use C++!! by Baki · · Score: 1

      What the hell are you talking about? Hashes aren't even part of th STL. What lib are you using?

      We use STL all over in our software, on various UNIX platforms. Maps and vectors all the way (where in earlier times we had to fiddle with malloc/realloc and free, now everything goes easy and there are no more forgotten free()s thus no memory leaks), never had any problems.

      Most UNIX C++ vendors offer good STL implementations. The only one, alas we had to code around bugs is GNU's libstdc++. I know that they've worked a lot on it since the release of EGCS, so I hope that GCC 2.95 brings improvements in libstdc++ so that it becomes useful too.

    16. Re:Huray! Now, more people use C++!! by slashdot-me · · Score: 1

      I've started using python for a lot of my projects (home & work). For example, a recent project I did at work used python for everything except the hard core data structures. These data structures were managed by a bit of non-OO C++ code. I'd have used python, but when you want to keep 100 million objects in ram you notice the overhead :)
      There are times when writing full-OO C++ makes things a lot more difficult. The C++ portion of this project was only 2500 lines. Cool things about non-OO C++:
      + declare your vars immediately before use.
      + string, queue, and friends

    17. Re:Huray! Now, more people use C++!! by Eccles · · Score: 1

      The other thing about C++ is the STL. Don't even make me talk about the STL, I just tried to use it in a program and I'm now trying to remove all references to it. [...] my hash tables [...]

      Hash tables are not part of the standard library as defined in the C++ standard. Thus it isn't too surprising that they might cause you problems. You can't blame the language for features that aren't part of it.

      If you took two char *'s and compared them, it would compare the addresses. Don't expect the default behaviour of C++ to do anything different. If you wish to compare based on the contents of the strings, you should be able to provide an alternative comparator in the template.

      (It's hard to include much code in Slashdot due to character munging. If you want specific help, demunge my e-mail address and e-mail me.)

      For example, if you had a std::set of char *s, it would just compare by value. But if you do
      std::set mySet;
      Then it will sort using the () operator of MyComparator, which you can tie to strcmp or something like that. You might also want to consider using a string type instead of char*'s, for internationalization reasons.

      One of my co-workers starting using STL two days ago, and came to me for a little starting help. Two hours later he came back and was gushing about how cool it was to encode powerful, efficient algorithms in just a few lines of code. Perhaps you just need another me handy? Ask for help on comp.lang.c++.moderated.

      You can have my C++ compiler when you peel it from my cold, dead fingers.

      --
      Ooh, a sarcasm detector. Oh, that's a real useful invention.
    18. Re:Huray! Now, more people use C++!! by mill · · Score: 1

      Gtk-- is the C++ wrapper for gtk+.

      /mill

    19. Re:Huray! Now, more people use C++!! by Eccles · · Score: 1

      From an OO perspective, that is 'equality'. Two objects that happen to contain the same information, are still two different objects, and thus not equal.

      This is not correct.

      Equality for char *s is comparison of addresses, because they are pointers. Compare two pointers and it's the addresses that determine equality. Strings stored in char *s are not truly objects. If you want to compare string contents, you should use a string object of some sort or a comparator function. If you want to use char *s with an STL algorithm, you'll need to provide a comparator function object that does the comparison technique you desire. For example, I have two sets, one of which has as its keys iterators into the other set. By providing a special comparing function object, the iterator set is sorted on a different property of the key than the other set.

      --
      Ooh, a sarcasm detector. Oh, that's a real useful invention.
    20. Re:Huray! Now, more people use C++!! by sjames · · Score: 2

      C++ has it's pros and cons like every other language. Likewise, it is better suited to some applications than others. C++ code can be syntactically cleaner, and more maintainable, or it can be MFC.

      It's biggest drawback is that it can obfuscate inefficiencies in code. What looks like a simple assign (or memcpy) can end up serializing and parsing at a high cost.

      It may not even be bad coding when the objects are implemented that way (perhaps the 'assigns' are never done in performance critical areas and the marshalling is needed for interoperability.) The problem starts when sombody else has to maintain the code. They end up loosing the advantages of OO code because they either have inefficient code, or have to study the objects and their relationships just as deeply as they would in C.

      Personally, I find that by the time I dig through C++ code (for the fabled ease of code reuse) to check for those problems, it would have been just as easy to cut/paste C code. If the objects are available in library form only, it just means that you either end up with wrappers looking like chinese boxes (so that doing anything involves too many pointer dereferences internally), or you end up with a dozen similar objects that all inherit from the same base and do the same thing in slightly different ways.

      C++ does have a few nice features. Most of those seem to be in the process of back-porting into the C standard.

      Some things call for C++, others call for C, Perl, or Lisp. Some few things even call for assembly.

      While it is true you can write OO-like code in C, why would you want to?

      In cases where OO is the right approach, but I want to make the cost of various operations quite explicit. The Linux kernal is written that way.

    21. Re:Huray! Now, more people use C++!! by Axe · · Score: 1

      Personally, I began to really like C++ after STL appeared. IMO it is much more interesting feature than OO stuff. Well, for the thing I do...

      --
      <^>_<(ô ô)>_<^>
    22. Re:Huray! Now, more people use C++!! by Axe · · Score: 1

      I'd agree with all that with the exception that the templates in the STL are incredibly useful and ought not be avoided.

      Bingo. I found that most people trashing C++ had not update their knowledge since late 80s, early 90s. ISO C++ is a different beast.

      For most data analysis code C becames ugly and incredibly error-prone.

      Just why should I use char** for a vector of strings? With all related malloc() nightmare?
      Why write my own containers, or reuse somebody's library with obfuscated interface? Hunt down stupid pointers. Bleh...

      --
      <^>_<(ô ô)>_<^>
    23. Re:Huray! Now, more people use C++!! by Foogle · · Score: 1

      It's easier to shoot yourself in the foot trying to do what C++ does in C. Protected class members make it much easier to keep your code as OO as possible.

    24. Re:Huray! Now, more people use C++!! by jacobm · · Score: 1

      Actually, the STL isn't broken at all because of that inconsistency. What's broken is the C-ism of using char *'s as strings. The hash table hashes char *'s based on all the data from the address until the next '\0' not because the programmers were morons who didn't know what they were doing, but because in C people use pointers to characters as an expedient hack for a string data type, which C is sadly lacking. C++ with the STL fixes that with the string class, but if you insist on giving a char * a meaning that it doesn't have naturally, then you don't have the right to get upset when the programmers of your tools make concessions so that you can use it with a minimum of hassle.

      If it bothers you that you're really doing a pointer comparison when you say (charPtrA == charPtrB), the solution is to use STL strings instead, which hash just fine with no inconsistency of hashing vs. equality (that is, *stlStringPtrA == *stlStringPtrB if they have the same string value, and hashValue(*stlStringPtrA) == hashValue(*stlStringPtrB) as well). In fact, you should use STL strings for everything anyway if you're programming in C++, because they're far superior to char * pseudostrings, whose disadvantages are myriad (such as segfaults if you don't do things to them that would seem illogical to do to strings, linear time length-finding, non-growability, and so on), and whose only advantages are that they're easy to implement and have very small memory overhead. But you don't have to implement strings yourself, and I don't know about you, but my computer has enough memory that it can spare a few bytes if it makes my life easier.

      --
      -jacob
    25. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Could you please then elaborate on how C will emulate data encapsulation and dynamic binding (polimorphism) ? I like to know if this is possible with the same amount of lines of code (loc) -- I suspect it is not possible. If it turns out that (for these OO features alone) a C program must be 5 times longer, with functions decoupled from their structures, and with no concept of 'private', it will be too easy to conclude that C is far inferior to OO languages. In this discussion we concerned ourself only with coding. I'm willing to postpone discussions about the maintenance phase and prediction models for some other day.

    26. Re:Huray! Now, more people use C++!! by Rene+S.+Hollan · · Score: 1

      While I love C++ (when I'm not hacking together some assember - what a paradigm shift), as with all powerful things, the language can be horribly abused: derivation in place of aggregation, and so forth.

      C++ adds to C the sort of things that serious programmers need to manage large projects. In many cases these things are overkill for small ones and just obfuscate things. Of course, it has a strong OO background (but that just reflects that sometimes an object-programming paradigm is what is desired).

      To truely appreciate what C++ can do fo you, read "Design Patterns" by Gamma, Helm, et. al.

      --
      In Liberty, Rene
    27. Re:Huray! Now, more people use C++!! by jacobm · · Score: 1
      I'd agree with all that with the exception that the templates in the STL are incredibly useful and ought not be avoided.

      Amen! Anyone who thinks that STL is useless has obviously never spent 4 hours discovering that they're pushing A pointers onto a stack and casting the void pointers their pop() function returns to B pointers, 10,000 lines and many files away. Compiler errors are your friends!

      --
      -jacob
    28. Re:Huray! Now, more people use C++!! by Jordy · · Score: 2

      Oh lord, another language war.

      C++ and other OO languages have been proven to be more efficient for programmers on projects larger than 100k lines.

      It takes less time for a programmer to start working with a large codebase written in C++ than in C plain and simple.

      For example, I was able to make modifications to a bug in Mozilla roughly 20 minutes after I first took a look at the source. When you break your namespace for functions and variables down into peices the way C++ does, it is easier to digest.

      While it is true you can write OO-like code in C, why would you want to? C++ is just an extension of C; all the functionality of C is included in C++ at a minimal cost.

      --

      --
      The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
    29. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 1

      Object Oriented programming is a concept. You don't need an object oriented language to implement a program with this paradigm, languages such as C++ simply facilitate it. C code if well written and well structured, is as useful as C++ for producing an OO program IMO.

    30. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Not quite ready yet I am afraid. Do not get me wrong. As a long time C developer I did not jump on the C++ band wagon for quite some time but was watching it. It has gone a long way and is quite a nifty language now.

      Still many compilers do not offer an ISO C++ environment yet, egcs included, and this can be a pain in the back (I am working with six different compilers for the time being).

      I too think get ready if C++ is the right language for your environment, I have come to love it.

      Many thanks to all that could contribute to gcc from here.

    31. Re:Huray! Now, more people use C++!! by spacey · · Score: 1

      AFAIK the only tool you've named that relies a lot on c++ is qt.

      -Peter

      --
      == Just my opinion(s)
    32. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Could you please then elaborate on how C will emulate data encapsulation and dynamic binding (polimorphism) ?
      I suppose I should define my terms :-/ Note that I didn't say that C++ sucks or anything along those lines (the STL is another issue..) -- but for many projects C is just fine, and well-written C code is better than poorly-written C++ (or C) code any day. Also note that I never claimed it could be done with the same number of lines of code, so I'm going to ignore that (although the first can be done with minimal overhead)

      Data encapsulation -- I mean that we can create a structure (say, an "object") which is created, destroyed, and accessed only by prescribed functions.
      Polymorphism -- multiple data types that can be accessed interchangeably via a standard set of routines. Note that this is *separate* from inheritence, in which one data type can be built on another. Inheritence can also be implemented in C (see GTK+) but is a real pain :) -- luckily, inheritence is also one of the least-used OO features within a program (note that in C++ inheritence replaces interfaces)

      The first is simple to implement in C. Create an opaque structure and only allow pointer references to it. Then create constructor/accessor/destructor functions that act on the structure. You can even inline them if the compiler supports it. Case closed.

      The second is a little trickier, but it can be done. The *setup* code must be somewhat longer but it is a one-time cost. Create a 'class info' structure which lists the various functions in the interface (each must take a void* in addition to their other arguments, the constructor returns a void*). The object itself is a structure with two elements: a pointer to a class-info object and a void*. The void* will be set to whatever the constructor passes back. You can then, if desired, create some wrapper routines to initialize the interface and so on. You can make this more or less complex depending on how complex your program is. Obviously C++ is 'better' at this, but once the infrastructure is written using it is almost easy.. The code to implement this is pretty much a constant overhead and much shorter than it sounds (your program probably won't bloat by 5 times unless it's *really* short); you can in fact call functions from structures if you tweak it a little
      although I prefer wrapper routines and you'll have to pass the structure explicitly; we have a concept of private here but little concept of 'public'..) I'm not sure why I'm saying this, since I have a suspicion you're a C++ bigot. *shrug* I already said, I'm writing a program in C++. It's not a totally broken language. But to say that C is 'far inferior' to OO languages is rather silly. Not everyone needs the kitchen sink.
      C++ doesn't support anonymous or curried functions. Because you can only write an emulation of currying with much template hacking and trouble, should I conclude that it is far inferior to functional programming languages?
      Daniel

    33. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Oh, I set things up to use strcmp, but I feel that it is inconsistent to hash on the string's *value* in one place and on the *address* in another. It should either specialize the hash classes to handle char *'s specially, or fix the hash function to work on char *s by address.

      C++ is a nice language but it is not the only language anyone should ever use and I get tired of being told this. (especially since I already use it where it makes sense!) I just don't like the STL -- it's too big and messy a black box for me to feel safe trusting my data to it. :)

      Daniel

    34. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Then the hash function should not hash based on the information contained in an object but only on the address. Doing one thing in one place and another somewhere else is broken.

      Daniel

    35. Re:Huray! Now, more people use C++!! by Anonymous Coward · · Score: 0

      Linux, Gimp, Apache, Samba, Sendmail, Gtk+, Qt
      Um, the only one of those that has anything to do with C++ is Qt. GTK+ is object-oriented, but I really hope you don't believe that C++ is the only (or the first) object-oriented language. And Linux is most certainly not written in C++ -- in fact, there's a discussion in the FAQ about why not. (I think maybe you are thinking of Minix?)

      Daniel

  27. Re:Ada kernel by Scurrilous+Knave · · Score: 3
    Ada95 supports OO programming, but unlike, say, Smalltalk, it doesn't restrict you to that model. You are correct that an Ada kernel would be easier to maintain, and yes it would be more portable--at least in my experience, Ada is more portable not only between platforms, but between compilers, than C, and even moreso than C++. The "not as efficient" is a myth. One can write inefficient code in any language. Real efficiency comes from choosing your algorithms wisely--a warrior thinks of tactics, a good warrior of strategy, but a great warrior thinks of logistics. And besides all that, since an Ada compiler has more information than, say, a C compiler, about what the programmer actually wants, it can make better decisions and actually generate more efficient code, especially for today's pipelined multiple-functional-unit CPUs. Not that GNU Ada necessarily does better than GNU C, but in practice the efficiency question is a red herring.

    I applaud the fact that you didn't just blindly flame what you do not know. I would suggest that you learn a bit about it--who knows, you might like it!

  28. To bad I can't get it to build on Linuxppc 99 by rdn2 · · Score: 1

    If anyone has gotten it to build on Linuxppc could you e-mail me and let me know if you had any problems, and how to get around them.

  29. ANSI Standards by Anonymous Coward · · Score: 0

    Yes ANSI standards exist. If you know of anyone who's ever shipped software and been able to use nothing but ANSI C/C++ I'd like to hear about it.

    And no, Unix isn't really ANSI, because you're programming to an operating system, and even POSIX unices are different enough that you end up with ifdefs.

    1. Re:ANSI Standards by Anonymous Coward · · Score: 0

      > And no, Unix isn't really ANSI, because you're programming to an operating system, and even POSIX
      > unices are different enough that you end up with ifdefs.
      We are talking about C-compilers here, not operating system. That some fiddling is needed to port something to different OSs is not related to the choice of compilers.

  30. Backward compatibility? by Elvii · · Score: 1

    Anyone know how backward compatible gcc 3.0 is gonna be with say, libc5 and 2.0.x? I have systems that haven't been upgraded to glibc2/2.2.x/egcs etc yet... or is 2.7.2.3 still going to be the recommended version for non-cutting edge machines? I'm sure there's a lot more boxes out there than just mine that have gcc 2.7 for 2.0.x and similiar compatibility, after all.

    David

    --
    This sig left intentionally blank.
    1. Re:Backward compatibility? by Anonymous Coward · · Score: 0

      If you are using the old libc and old kernel you'll have to stick with old gcc as well.

    2. Re:Backward compatibility? by Anonymous Coward · · Score: 0

      It should run fine--but be warned that you can't compile any version of the Linux kernel with gcc-2.95 yet, due to kernel bugs... I take that back--2.2.x *will* compile, but it won't run.

      DO NOT RECOMPILE YOUR KERNEL UNTIL THIS IS FIXED

    3. Re:Backward compatibility? by rugger · · Score: 1

      gcc-2.95 compiles ok on my machine ok. IT also seems to compile programs ok.

      I am running slackware (4.0), libc 5.4.46, kenel 2.2.10 however YMMV.

      Hope this helps

  31. Re:Kernel and GCC 2.95 by Trepidity · · Score: 2

    Is there any indication from any Important People(tm) when this bug in the kernel will be patched?

  32. Mirrors? HAH! by Edward+Carter · · Score: 1

    If you're up this late on Friday night reading slashdot, you needn't use a mirror. I just downloaded the whole thing at about 300k/s straight from ftp.gnu.org. :)

    1. Re:Mirrors? HAH! by xer.xes · · Score: 1

      You really think you're the only one on the planet, don't you?

      --
      xer.xes -- 4181
  33. Re:Kernel and GCC 2.95 by devphil · · Score: 2

    Hit the egcs mailing list archives off of the
    egcs homepage. There is a long, long collection
    of threads about this problem, dealing especially
    with the Linux kernel. Linus Himself[tm] gets
    heavily involved.

    Parts of it turn into a flamefest, but there
    /is/ a good deal of information down in there as
    well.

    In any case, it's not a showstopping bug; you
    just have to use a flag.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  34. Re:Cox@home in omaha !?!? lame thing 1?!?! by Edward+Carter · · Score: 0

    If you're on redhat 6, don't use pump. Update to the latest version of dhcpcd, and modify the ifup scripts to invoke dhcpcd with a -h command line parameter instead of pump.

  35. Re:Glacial compile times and huge dwarf builds by devphil · · Score: 1

    + This is probably because of the lack of
    + precompiled headers. Much of the source
    + includes the headers to libs and system stuff.

    Most probably. Without optimization, by far the
    bulk of a compiler's time is spent parsing.

    Without meaning to sound condescending, I must
    at this point mention things like the redundant
    include guards described in the Lakos text. I
    found that the little extra typing really can
    speed up the compliation stage significantly.


    + 4 Meg executable swells to a mindboggling
    + 130MB of god-knows-what nonsense when the
    + -g flag is on.

    Speaking only for myself, not the EGCS people:
    why do you care? It's the debugging version,
    not the production version.

    I realize that's harsh, but for the most part
    my binary sizes don't get much attention from
    me until after I turn off -g, enable a string
    of space-saving optimizations, and then strip
    the binary.


    + the current situation sucks for those of us
    + with beefy apps.

    My last major project was beefy enough, and
    egcs pulled through with flying colors for me.
    If you have suggestions, I'm sure the EGCS
    maintainers would welcome your patch...

    Luck++;
    Phil

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  36. Re:Hm... by baus · · Score: 1

    I used to be anti-STL until I was forced into
    using it. Now I believe it is totally optimal for
    what we are doing (manipulating many large data
    sets generated from a numerical engine).

    One reason I was against it initially is that it
    requires a very standards compliant C++ to work
    properly. Honestly I've been using the M$
    compilier which is pretty compliant, but is
    missing partial specialization which would make
    iterator_traits work correctly.

    Also I have found that use of STL's generic
    programming paradigm, if bought into permeates
    your code beyond the use of collections. For
    instance I find myself doing this all the time

    class foo{
    template
    void bar(It begin, It end);
    };

    Unfortunately MS forces you to define bar inline
    in this situation, but it works...

    Generally STL == good

    Negatives:
    compilies very slow
    Bloats object code.

    Anyway I'm intested in getting my hands on the
    latest GCC to start attempting to compile some
    of the STL code I have been working on.

  37. C++ is not OO, it's multi-paradigm by Anonymous Coward · · Score: 2

    C++ is not OO, it's multi-paradigm.
    It means that it supports the combined use of classic low-level structured programming (C), object-oriented programming (Simula), and template programming / stronger typing (Ada).

    SmallTalk is 100% pure Object. Java is around 75%.

    Now, my opinion: C++ is overcomplicated, mostly because it is too low level and high level at the same time.

  38. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

    Because I wan't my compiler to be faster than VC++, it's a test of manhood.

  39. Re:Upgrade consequences? by Cadaver · · Score: 2

    Compile kernel 2.0 only with gcc 2.7.2; compile kernel 2.2 with -fno-strict-aliasing enabled as a CFLAG in arch/i386/Makefile, and you'll need to edit the configure script for glibc2.1.1 to get that working (and, of course, you need to set CFLAGS=-fno-strict-aliasing with this as well)

    --
    I ate something that disagreed with me. Maybe I should have cooked him first.
  40. Optimized around nbench by heroine · · Score: 1

    Ever notice than when compiling nbench with a bootstrapped egcs and -march=i686 you get an outrageous result for neural net? Is there some way to get the Pentium II optimization without breaking nbench?

  41. Re:Kernel and GCC 2.95 by Chandon+Seldon · · Score: 1

    AFAIK a linux kernel written in Ada would never get up to the complexity level of Minix, because all the coders would get fed up.

    --
    -- The act of censorship is always worse than whatever is being censored. Always.
  42. Geez, the compiler is a tool by Anonymous Coward · · Score: 0

    This ain't a beauty contest. The faster the code it produces, the better it is. So no, GCC is not the finest compiler on earth, not by a long shot.

    1. Re:Geez, the compiler is a tool by Anonymous Coward · · Score: 0

      > The faster the code it produces, the better it is.

      This is NOT the sole criterion for judging compilers. Ever heard of 'portability' by chance?

      Most of the 'faster' compilers out there share some of these problems:
      - only compile code for 1 type of CPU
      - only work under 1 OS
      - have problems with standards compliance
      - buggy in general

      They may be fine for a Windows-only developer, or for someone who just needs to write one math routine and execute it a billion times, but they can be a real pain in the ass for those of us who actually do multi-platform development.

      The fact is, if you download source off the Internet and expect to be able to compile it, you better have a copy of GCC installed.

    2. Re:Geez, the compiler is a tool by Anonymous Coward · · Score: 0
      I think you've forgotten an old saw of software development.


      "I can make it as fast as you like as long as it doesn't have to work." (Roughly.)

    3. Re:Geez, the compiler is a tool by guacamole · · Score: 1

      Show me another compiler that runs on +30 platforms and supports as many programming languages. I don't care that SUN Workshop or CodeWarrior produce better code, I want my stuff to be portable.

  43. Modula 3 kernel - SPIN? by Christopher+B.+Brown · · Score: 1
    Modula 3 is um, somewhat simpler than Ada, and doesn't have the burden of the huge design process.

    Effectively, M3 was a "one group" implementation, a Modula family language produced by DEC.

    It appears to be about as portable as GCC, and the SPIN OS is written in it.

    I could imagine worse ideas than trying to build a kernel in Modula 3...

    --
    If you're not part of the solution, you're part of the precipitate.
  44. Test Software sans OOP by B.B.Wolf · · Score: 1

    I write and maintain test software for a large
    product line. Our enviroment has been defined
    as ANSI C. With the number of developers on two
    continents working in the code, that we have,
    standards are critical. Resently we have been
    running into difficulties. To solve them we have
    been implimenting some OOP concept in regulare
    old ANSI C. Monday I will be submiting even more
    changes in that direction to my team for review.

    For some tasks OOP is the only way to go. We will
    eventualy be migrating to C++. Having the path to
    OOP that C++ provides will make my job much easier.

    Saying that C++ is trash is silly, and demonstrates
    a very myoptic view of programing. As with all
    languages, there are "features" that should be
    avoided. But data hiding and single inheretance
    are incredably valuble. Especially in instrument
    control.

  45. Re:Upgrade consequences? by pedro · · Score: 0

    I don't mean to be a jerk, trust me.
    But if you have to ask that question, you need to learn a whole lot more about how gnu compliant software works. You need to know more about software, period.
    Configure is a brilliant hack that determines what sort of machine software is being compiled for. You don't want to compile a new libc and attempt to install it unless you know EXACTLY what the hell you're doing. It's the heart and soul (next to your kernel) of the whole machine. Break it, and you won't boot.
    Leave it alone. If you need a new libc at your point of development, get a new distro on cd, and reinstall.

    --
    Brak: What's THAT?
    Thundercleese: A light switch.. of TOTAL DEVASTATION!
  46. Grow old waiting for Link wth DWARF by BruceQ · · Score: 1

    The reason that I care that the executable grows to 130MB is that I HAVE TO WAIT FOR IT TO LINK!

    I guess I am spoiled by 30 second turn arround times on other platforms to link my app but 8-10 minutes to make a small change in one file and launch the debuger is way beyond unacceptable.

    --BQ

  47. Re:Kernel and GCC 2.95 by grahammm · · Score: 1

    When compiling 2.3.12 (the latest dev series kernel), I went to add the -fno-strict-aliasing but found that the makefile already tested if the compiler supports this and was adding itself. - So no edit needed.

  48. Re:I have never seem a large GUI scheme app... by baus · · Score: 1

    >Also it allows you to dynamically (ie at runtime) interject a class in your hierarchy

    How is this of value? Deep inheritence
    heriarchies are evil enough. I can't imagine
    wanting deepen them at run time. Sounds like
    a maintence nightmare to me.

  49. Re:RH6 RPM's? by Archangel_ · · Score: 2
    Best place to try is ftp.redhat.com/rawhide, or ftp.redhat.com/contrib, and if cant find it there try www.freshmeat.net. If don't know how to make rpm spec files, there are tools available that could help you to make rpms:

    installwatch

    gnome rpm work station

    I could list more....just go to www.freshmeat.net and search for rpm.

    --
    "Gravity must be scholastic occult quality or the effect of a miracle."
  50. Re:RH6 RPM's? by Gleef · · Score: 2

    You can't get RPM's for this yet, it's just been released! You'll be able to get them when someone makes them, and you'll surely be able to get them at the Rufus RPM Repository. In the mean time, you can try compiling it yourself from the released source. Even better, you can make your own RPM of it, go to RPM.org to learn how (Maximum RPM is a great book).

    ----

    --

    ----
    Open mind, insert foot.
  51. Re:Kernel and GCC 2.95 by grahammm · · Score: 1

    I wonder how many other programs will show this same problem. I would be very surprised if the Linux kernel is the only thing which has aliasing problems.

  52. Re:Upgrade consequences? by grahammm · · Score: 1

    Will it be necessary to rebuild glibc2.1.1 after upgrading to gcc2.95, or should the glibc I built with egcs1.1 continue to work?

  53. Yes it is a beauty contest by Anonymous Coward · · Score: 0


    because I say so. I did not post the original
    comment, but I agree with it. :P

  54. Well.. by Axe · · Score: 1

    ..then buy yourself a compiler you like. Or write one. ;)

    --
    <^>_<(ô ô)>_<^>
  55. Re:Performance of compiled binaries compared to pg by ghazban · · Score: 1

    Hey, just ran a benchmark on the binaries in different areas comparing pgcc to gcc 2.95 using the hwinfo2html program (http://rob.current.nu) and compiler flags "-O9 -mpentium -ffast-math". I found that pgcc has a slight edge in performence at this stage, but not by a noticable amount. Have a look here . Most interesting are the nbench results as the others shouldn't be affected. Lucas

  56. Re:Chill support by John+Allsup · · Score: 1

    In short, CHILL is a language that you DONT want to use. It's there for two reasons. One is as a simple example front end, and the other is that some poor sods actually use CHILL, and paid Cygnus to maintain the CHILL frontend.
    John

    --
    John_Chalisque
  57. Re:Glacial compile times and huge dwarf builds by John+Allsup · · Score: 1
    4 Meg executable swells to a mindboggling 130MB of god-knows-what nonsense when the -g flag is on.
    Speaking only for myself, not the EGCS people: why do you care? It's the debugging version, not the production version. I realize that's harsh, but for the most part my binary sizes don't get much attention from me until after I turn off -g, enable a string of space-saving optimizations, and then strip the binary.

    Ok, what exactly does that do to the compile/test/debug cycle. I know that a small program that can be held in your head can be debugged there, but larger programs really need to be built and tested -- and that's where the ~8min's+ per compile becomes penal.

    p.s. Has anybody thought about a gcc based build environment that can be distributed across PVM's? (One aspect of this is the obligatory /. 'beowulf == k0o1' comment, but the other relates to those Multi StrongArm PCI boards, which could make an awesome compiling machine, given that compilers don't generally use much FP)


    John
    --
    John_Chalisque
  58. Re:Kernel and GCC 2.95 by WNight · · Score: 1

    Perhaps Linux does hold back the development a bit, but that's also a good thing. Having everyone add in their own favorite performance tweak, or little fix, will eventually bloat the codebase. If Linux makes a serious mistake, all the other big names will corner him and let him know, but if his only mistake is being a little timid with the stability of the OS...

    Besides, he's not going to veto something if it proves to work consistently in test releases. At worse it'll just take a year or so for something to be proven to the point where it gets folded in.

  59. Re:Glacial compile times and huge dwarf builds by ahornby · · Score: 1

    You don't say what platform/language you've tried gcc on but the linker can have a big effect.

    On Solaris, my egcs c++ builds are vastly smaller and quicker if I use the GNU linker. If throws away unused virtual function calls etc. If GNU ld is available on your platform I recommend you give it a go. Of course it is already present on Linux.

    Alex.

    --
    -- Thorin sits down and starts singing about gold.
  60. ADA = speed and bit twiddling??? by bug_hunter · · Score: 1

    I'm doing 2nd year computer science and from what I've seen of Ada (which is a lot) it makes bloated binaries, runs relatively slow and tries to cut off all entire low level operations from you.
    Granted it's a lot more robust but the costs are too high.
    Maybe for some certain apps it would be okay but as far as Kernel is concerned you need something with real speed and portable such as C/C++.

    --
    It's turtles all the way down.
    1. Re:ADA = speed and bit twiddling??? by Anonymous Coward · · Score: 1
      I'm doing 2nd year computer science and from what I've seen of Ada (which is a lot) it makes bloated binaries, runs relatively slow and tries to cut off all entire low level operations from you.
      Get back to us when you are older and have become a software engineer. Clearly you haven't learned Ada since you have made such an erroneous comment. Ada gives you more low level control than almost any other language besides assembly language.

      Remember too, that the exercises given to second year CS students are usually to illustrate basic concepts such as ADTs and data structures. Your professors would rather that you learn the basics before you start bit twiddling the registers of your lab computer. And consider yourself luck that you attend a school that uses Ada for its course work. The experience will serve you well no matter what turn your future career takes.

      In order to satisfy your curiosity, why don't you decide that this week you will learn about all the mechnanisms in Ada for bit twiddling and low level control? If you get stuck, try asking for help in Usenet's comp.lang.ada.

  61. No, C++ appeals to people who understand OO by Anonymous Coward · · Score: 0

    Concepts like polymorphism and inheritence are just a little too complex for some C programmers mind to comprehend I guess... As far as clairity, look at GTK's "hello world" vs Qt's. That same ease of coding extends all the way to large and complex applications.

    1. Re:No, C++ appeals to people who understand OO by mill · · Score: 1

      Indeed we should use "Hello world!" to compare languages and toolkits. It is the ultimate test and since we all are working on making the next great "Hello world!" program it is the one and only test case.

      print "Hello world!";

      Perl rules.

      /mill

    2. Re:No, C++ appeals to people who understand OO by scrutty · · Score: 1
      Hey on most Linux distributions I use its just % /usr/bin/hello

      --
      -- Oh Well
    3. Re:No, C++ appeals to people who understand OO by Anonymous Coward · · Score: 0

      Bash is better, no need to even start up an interpreter:

      % echo "hello world"

  62. Justifications? by Anonymous Coward · · Score: 0

    Many (most?) large GUI applications on most platforms are written in C++. Why? It's easier to maintain and troubleshoot the code when everything is a class object, and it's faster than Java. Hardly useless trash.

    1. Re:Justifications? by jacobm · · Score: 1

      Though in all honesty, GUIs are much more easily programmed when you have languages with real first-class functions (eg Python, Scheme).



      Of course GUIs can be done other ways, but why would you want to? Speed? Bah. Scheme and Python both run plenty fast enough to handle waiting for you to click on things. Just take the parts that really NEED optimization (which will not be the GUI) and write them in C or assembly. So you get ease of programming with a nice high-level language, and speed where you need it from a low-level language. Don't try to find one language that will do both for you, because you'll probably end up with the worst parts of each rather than the best.



      With that said, I should admit that I usually program in C++. What can I say? I don't often program GUIs, and I like to overload operators. "You have no power! I will TELL you what addition is! Hahahahaha!" =)



      -jacob



      Hmm. I imagine I should air out the asbestos suit right about now...

      --
      -jacob
  63. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 0

    ..such as?

  64. That was just an easy example by Anonymous Coward · · Score: 0

    Why don't you compare KSiag vs GSiag, KFM's code vs GMC (and KFM does *much more), KWord vs AbiWord, etc... Like I said, this ease of use extends all the way to large applications.

  65. Ada kernel by Scurrilous+Knave · · Score: 1
    AFAIK a linux kernel written in Ada would never get up to the complexity level of Minix, because all the coders would get fed up.
    "AFAIK"? That tells me that you know very little. Some of the most complex programs in the world are written in Ada. It scales far better than C or C++.

    Many in the hacker/free-software/open-source communities disparage Ada because:

    • They were forced to use Ada83 in an undergraduate programming class.
    • Their friends and role models disparage it.

    I can understand why a hack programmer wouldn't like Ada (which is what we now call the modern OO language formerly known as Ada95), but most software engineers and disciplined programmers absolutely love it. Loving it, and being able to use it in a project because of political reasons, are often two different things. But on a purely technical basis, Ada rules for complex programs.

    On the chance that anyone here might like to learn more, maybe try GNU Ada on their Linux box, see the Home of the Brave Ada Programmers, the starting point for All Things Ada on the web.

    And I have to agree with the first poster--an Ada kernel would kick some serious butt. But I'm not convinced that it will never happen. That's what they said about the rise of Linux, and the decline and fall of Microsoft.

    1. Re:Ada kernel by N1KO · · Score: 1

      What decline of Microsoft? Do you have a time machine I could borrow?

    2. Re:Ada kernel by Anonymous Coward · · Score: 1
      OTOH, Ada (and OOP languages in general) is not as efficiant as C

      You have been misinformed. For non-trivial programs Ada is usually faster than C or C++. There are many reasons for this but two of the most important are non-aliased memory references and global analysis by the compiler. The compiler has a much better idea of where memory is being referenced because Ada does not rely on pointers. Thus it is far easier to safely optimize Ada than C or C++. And unlike C or C++ where a program is optimized on a per module basis, Ada uses a global analysis which allows for global optimization across modules. It should come as no surprise that because of its speed and safety, Ada is the favorite language for real time control systems where response time and safety is critical. Boeing and Airbus are two of the giants of the aerospace industry that rely on Ada for its speed and robust behavior.

      With respect to the Linux kernel, an Ada implementation would likely be faster, easier to maintain, and contain fewer bugs.

    3. Re:Ada kernel by Anonymous Coward · · Score: 0

      >It is my opinion that many of the professional >programming world like OOP because that's
      > what they learned on, not because >it's any better
      I started programming (back in 80's) with Turbo Pascal 4.0 - then current version. That was not much more then implementation os Pascal Standart, it had efficiently no OOP at the time, just good structure. As time passed I moved on to newer versions. TP 7 introduced some OO, that was great. Even bigger shift was made when Borland went Delphi, it has most complete (for Pascal line languages, I'm not commenting on Ada or Modula here due to the lack of experience) OO. I can tell from my own experience, OOP makes a great difference especially for complex projects. As for one I don't regret my shifting into OOP.

    4. Re:Ada kernel by ioctl · · Score: 1

      disclaimer_mode_on
      I've never used Ada, nor have I even ever seen it. This is just a general comment that would apply here.
      disclaimer_mode_off

      I tend to disagree; OO programming languages in general feel very bloated and clunky to me. I really don't have a good reason for this, other than it's just my opinion (and no, it's not because it's cool to say /believe that). It is my opinion that many of the professional programming world like OOP because that's what they learned on, not because it's any better
      You do have a point about an Ada kernel, however, it is more of a trade-off than anything. Ada would be easier to maintain than C, and prolly more portable (not sure about that one). OTOH, Ada (and OOP languages in general) is not as efficiant as C. Besides, if you really want to, you _can_ write OO code in C (I should know, I've done it before).

  66. Performance of g++ vs. competition under Linux by jaffray · · Score: 2
    Anyone want to comment on the speed of g++ compiled code compared to other C++ compilers? I'm writing a performance-critical C++ application and wouldn't mind getting 10-20% speedup for free. But if g++ is within 1-2% of the fastest out there, it's not worth messing with for now.

    KAI C++ makes grand performance claims, and Comeau is another compiler built on the same ECG backend (but much cheaper). I'm mainly interested in the Linux platform for now.

    Notes:
    1. Language trolls can buzz off, I'm aware of the performance issues of using C++ vs. C.
    2. I know KCC has a time-limited demo, and I've downloaded it, but it looks like it's much stricter about the C++ it accepts; it might take a while to get my code to compile with it, which is why I'd like to get some feedback before deciding whether or not to mess with it.
  67. Re:Web pages by dvdeug · · Score: 1

    The main webpage & what's new on www.gnu.org should be updated too.

  68. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 2

    > There have been some heavy debates about this on the kernel mailing list and apparently the
    > communication between the egcs team and Linus was not very successful :-/

    I don't understand that...

    What do you expect?
    Should the egcs team hack the compiler to work around "missbehaviours" in the linux sources?!?

    Linux that has the problem, *not* egcs. Nearly all other pieces of software (incl. other kernels) compile and work just fine with egcs.

  69. AMD K6? by Anonymous Coward · · Score: 0

    Is there _real_ optimization for K6/K7 line?
    If still not then it looks very strange to say the least, doesn't it, as K6 is pretty different internally to Intel line.

    1. Re:AMD K6? by Anonymous Coward · · Score: 0

      oi! now i have a strange feeling im gonna spend the next few days recompiling all cpu intenstive stuff for K6... (xf86, glibc, mesa, gimp, etc)...

  70. Hm... by Axe · · Score: 1

    I bet you have no idea how to use STL.
    I know, it can be hard to start for many slow-minded people, but if you persevere and actually learn how it works (including some internal details about its built in memory management) you will understand that it is the best set of containers to use among almost all languages (taking into account both performance, flexibility and easy of use)..

    --
    <^>_<(ô ô)>_<^>
    1. Re:Hm... by Anonymous Coward · · Score: 0

      I know, it can be hard to start for many slow-minded people
      Yes, this *really* encourages me to keep using the STL. "use the STL and you can insult people for not being elite enough too!" (luckily you aren't doing anything to discourage me, any more than the idiots using Linux/*BSD are about to make me flee to Windows...there are enough real reasons that I don't need the STL)
      Ai, just go read the Advocacy HOWTO please :)
      Daniel

  71. Doesn't take much to impress you, eh? by mholve · · Score: 0
    There's way more to compilers than just speed.

    Flexibility and portability are two major criterion that you've overlooked. GCC runs on many OSes and with several languages and CPUs.

    It's also free. Fast enough. Open.

  72. Update Webpages LAST!!! by Anonymous Coward · · Score: 0

    Just write great software.

    "But the webpage isn't updated!" Sounds more of a PHB type comment to me.

    How many software people have the ability to write compilers PLUS the drive and free time to do it FREE (as in speech, not beer)? Not many is my guess.

  73. Re:Glacial compile times and huge dwarf builds by devphil · · Score: 1

    + Ok, what exactly does that do to the
    + compile/test/debug cycle. [...] that's where
    + the ~8min's+ per compile becomes penal.

    Do you want the 8 minutes, or the 130 MB?

    I was defending the binary size, not the compile times. :-) Yeah, the lack of preprocessed headers can really hurt once they stop changing, but like I said, I (and others) have been surprised at the difference some extra coding makes. Things like redundant include guards really do honestly work on a large project, and testing-in-isolation helps you to run that
    debug cycle much quicker, with tiny little testcases.

    It also helps to set TMPDIR to a ramdisk.


    + Has anybody thought about a gcc based build
    + environment that can be distributed

    I'm not an expert (yet, dammit :-), but I have to wonder whether distributing a compiler would be worth the overhead. Distributing the entire build, though, where each machine works on a different source file, is very cool, and is just the next logical step in "seperate compilation." Dunno about splitting the individual compilations of files... I wonder if/how Plan 9 does this.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  74. STL is a wonderful thing by TedC · · Score: 1
    I have found STL to be one of the most useful features of C++.

    I agree completely.

    I've always had a certain amount of ambivalence toward C++. On one hard, it addresses some of the short comings of C; but on the other hand, it has gotten so complex that it rivals Ada in this respect. Probably it's best feature is that it lets one pick and chose the features and paradigm that one wants to use, unlike some languages (which I will not name here, lest I be flamed to a crisp by some language x zealot) which forces one into a certain paradigm.

    But I really like generic programming in general, and STL in particular. It's unfortuanate that so few people have experimented with this type of programming.

    TedC

  75. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 0

    True, he seems to be a bit harsh at times, maybe he is. At the same time egcs started as an experimental compiler and up to 1.1.2 there are known optimiser bugs. I think it is quite fair to stay behind here and to say "use this compiler until further notice" to generate the kernel. Since the just the C part is required it does not eat up much disk space either and the kernel is "somewhat" special, fair enough.

  76. Re:I have never seem a large GUI scheme app... by jacobm · · Score: 1

    Hmm... well, if I was already off-topic enough to mention the interjection thing, I suppose it can't hurt to be off-topic enough to explain it... =)

    I haven't ever used that feature myself, and it is certainly good and probably advisable to write programs that don't use it. I think it's one of those things that you want to avoid if you can, but that can really be a lifesaver every once in a while. A situation I can imagine- say somebody wrote a Car class, and subclassed it to Toyota, Honda, Ford, Chevy, et cetera, and then models for each company, from which you are deriving your instances. Now you realize that you have a need to override a method in the Car class for cars built after 1985- so you'd really like your class hierarchy to have Car on top, with all of the companies models as subclasses of Car, and then NewCar as another class, also with all of the companies underneath. There are two problems, though- first, you're duplicating code for a potentially huge hierarchy, which is never good. Second, you may not have access to the source of the classes you're using, or permission to change them, in which case you're SOL with Java or C++. You could make a NewCar subclass of every model, but then you're duplicating your method a huge number of times, and it's a big pain too. The best solution is just to be able to take an object and figure out dynamically whether it's a Car or a NewCar- at some point after all the fields are set, just say "if you were built after 1985, interject NewCar in between Car and your company."

    I should again mention that I'm not a hard-core object-oriented Schemer, so I don't really know if that's the point of it or not, but it does seem that it would be useful occasionally.

    (Incidentally, I think JavaScript allows for the same sort of thing. Just kinda funny. I'd hate to think that JavaScript might be the choice of a new generation...)

    --
    -jacob
  77. Then you ought to love VC++! by TedC · · Score: 1
    The faster the code it produces, the better it is.

    I know this won't go over real big on a forum dominated by Linux users, but VC++ generates some really fast code. It's not just simple trimming CPU cycle stuff either; they (MS programmers) seem to be doing a pretty good job of recognizing patterns in code and replacing it with faster algorithms when it's "safe".

    TedC

    "There ain't no such thing as the fastest code"
    Michael Abrash

  78. Try again by Anonymous Coward · · Score: 0
    I don't mean to be a jerk, trust me.

    Well, you succeeded, despite your effort to the contray. "Leave it alone" is not a very helpful answer to his question. What is this, open source, but proprietary information?

    I would have answered his question myself, but I don't know the answer either. Hopefully there is someone out there that can give a pointer in the right direction.

  79. Parallel Make: by DAldredge · · Score: 1

    Try Magic Exec and parallel make for MOSIX from: http://www.mosix.cs.huji.ac.il/txt_contrib.html http://www.cs.huji.ac.il/mosix/

  80. Gatekeeper by Gustav+Eimar · · Score: 1

    Am I the only one who thinks gatekeeper.dec.com is slow on mirroring prep.ai.mit.edu theese days? /me is about to change fave GNU mirror :(

  81. Indeed!! A big thanks!! by Anonymous Coward · · Score: 0

    It's very cool and I know a lot of OSS projects are grateful for the wonderful contribution people make towards it.

    Great job!!

  82. I'm Confused by EvlG · · Score: 1

    Pardon my idiocy, but I have a few questions since I am so thoroughly confused.
    Is EGCS going to replace GCC? Is it going to be/already is GCC? Is it going to live side by side with GCC?

    My confusion stems from the fact that I seem to remember something about a name change for EGCS being posted on Slashdot not too long ago, and being fairly confused then. Now I can't remember what the name of my favorite compiler will be, and what neat new tricks it will have nestled inside.

    1. Re:I'm Confused by Cadaver · · Score: 1

      EGCS is now GCC. GCC is what used to be EGCS. Is that clear enough?

      --
      I ate something that disagreed with me. Maybe I should have cooked him first.
    2. Re:I'm Confused by Daa · · Score: 1

      GCC 2.95 is what was to become EGCS 1.2. The old gcc leading from gcc 2.8.1 was scrapped and replaced by the work from the egcs group , who are now the maintainers of "gcc".

      I expect over the next few months we will see gcc 2,95.x and then 2.96 which should include the new ia32 backend code.

      I doubt much more from pgcc will make it into gcc as the pgcc hacks break the compiler for non-x86 CPUs

      dave

  83. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

    You can install the new version without wiping the old, so at least you can use -V if all else fails.

    how? uh..

  84. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

    this may sound dumb, but what is the configure script for glibc?

  85. Maybe.. by Axe · · Score: 1

    ..buy GCC from Cygnus? I have heard that the commertial version that they sell (GNUPro and
    CodeFusion) has new IA32 backend already installed. According to the ad for the CodeFusion on the Cygnus site, it has 80% speed increase over "net egcs" for Pentium II for specific benchmarks (its on par with Intel's Proton(?) compiler on that, and 30% faster than VC6.0)
    Problem is CodeFusion is not shipping yet..Should be a matter of days(?). Don't know if the latest GNUPRo has the same optimizations.

    --
    <^>_<(ô ô)>_<^>
  86. Re:Upgrade consequences? by Cadaver · · Score: 1

    Yes, glibc2 should continue to work fine after you upgrade gcc.

    --
    I ate something that disagreed with me. Maybe I should have cooked him first.
  87. Egcs is replacing/merging with gcc by Anonymous Coward · · Score: 0

    The next gcc release will be egcs and the egcs name will be dropped.

  88. Link by Axe · · Score: 2

    Here

    Citation..
    (1) Code Fusion produces code that is 85 percent faster than the current Net GNU release, 20 percent faster than the Microsoft Visual C++ 6.0, and equivalent to Intel's Proton compiler. These results are based on the Integer Index performance in the byte benchmark.

    --
    <^>_<(ô ô)>_<^>
  89. Hmmm by Anonymous Coward · · Score: 0

    Right, bash is the interpreter!

  90. Make fun while I code by Anonymous Coward · · Score: 0

    In C++, of course ;-)

  91. I have never seem a large GUI scheme app... by Anonymous Coward · · Score: 0

    Although Python is nice and integrates well with KDE.

    1. Re:I have never seem a large GUI scheme app... by jacobm · · Score: 1

      As far as large Scheme apps, Dr. Scheme is one (a Scheme IDE that Rice University puts out- follow the link in my original post), though I don't really know how large "large" is in your estimation. A friend of mine is working on a big graphical theorem prover in Scheme. He's not working on the GUI, but finds Scheme's lambda-expression-esque classes really great. Apparently Scheme allows you to make a function that takes an interface and returns a class that implements that interface. Also it allows you to dynamically (ie at runtime) interject a class in your hierarchy- so if A extends B, but you want to put C in between so that A extends C extends B, you can do that. Pretty cool, imho. He says it makes his work a whole lot easier, even if Scheme is somewhat hard to understand if you come from an imperative background.

      --
      -jacob
  92. egcs replaces gcc and egcs renamed to GCC by Anonymous Coward · · Score: 0

    egcs replace the gcc/g++ collection,
    But now egcs is being renamed to GCC.

    So gcc is the c compiler,
    and GCC is the compiler collection.

    Dumb, if you ask me.
    They should have called it gcs to avoid this confusion.

    1. Re:egcs replaces gcc and egcs renamed to GCC by JoeBuck · · Score: 2

      We tried to ask you, but since you posted as Anonymous Coward we couldn't find you. Since we lacked your enormous wisdom, we, in our lesser wisdom, called it GCC.

      We considered the name "gcs". We decided to keep "gcc" because that's the name most people know; had we chosen any name but "gcc" some clueless folks would have kept running gcc-2.8.1 forever. Besides, we'd break every makefile in the world if we changed the name users type.

      Don't get hung up on capitals versus lower case. Remember, when you invoke the command "gcc", it will happily build C, C++, Objective-C, Fortran, Java, or Chill for you. So gcc is the GNU Compiler Collection.

  93. Late Friday night? by Anonymous Coward · · Score: 0

    Up this late? Friday night? Man, it's noon on
    a Saturday at least here in Funland :)

  94. More backward compatability by tardis · · Score: 2

    So, has anyone had anyone had any luck getting this to compile with
    last1120c or prestruct-c?

  95. The War Rages On... by Real+Timer · · Score: 1

    > It's biggest drawback is that it can obfuscate
    > inefficiencies in code. What looks like a
    > simple assign (or memcpy) can end up
    > serializing and parsing at a high cost.

    This is true, but you can just take a look at the assembler listing. The tough part (for me) is figuring out why it thunk to do what it did in the first place.

    > The problem starts when sombody else has to
    > maintain the code. They end up loosing the
    > advantages of OO code because they either have
    > inefficient code, or have to study the objects
    > and their relationships just as deeply as they
    > would in C.

    I disagree. Its always easier to understand *well-written* object oriented code (in C or C++) than structured code (in C or C++). And the warts that result from C's lack of OO constructs obfusicate OO code written in C. Writing efficient code has little or nothing to do with the language. It has much to do with the design and the developer.

    > Personally, I find that by the time I dig
    > through C++ code (for the fabled ease of code
    > reuse) to check for those problems, it would
    > have been just as easy to cut/paste C code.

    Reuse comes from documenting the reusable code (in C or C++). So, if you have to dig through it, it probably wasn't designed to be reused. Cutting and pasting almost always gives more, buggy (due to cut/paste errors) code that needs to be maintained.

    > C++ does have a few nice features. Most of
    > those seem to be in the process of back-porting
    > into the C standard.

    The only reason to use C++ is its OO features. I hope the structured enhancements do go back into C, but don't know of any case personally when someone used C++ to get these.

    > In cases where OO is the right approach, but I
    > want to make the cost of various operations
    > quite explicit. The Linux kernal is written
    > that way.

    Actually, if you read the kernel mailing list FAQ, they once did a C++ port, and it was significantly slower due to the quality of the compiler. The other reason they site for use of C is that that's what kernel programmers know, which is currently true.

    --
    Changes aren't permanent, but change is.
  96. Performance of compiled binaries compared to pgcc by ghazban · · Score: 2

    What is the performance of binaries compiled with gcc 2.95 compared to that of binaries compiled by pgcc and will the source changes that pgcc has made to egcs be envtually returned to the main source tree?

    Cheers
    Lucas

  97. Re:C++ is overcomplicated by Real+Timer · · Score: 1

    > C++ is overcomplicated, mostly because it is
    > too low level and high level at the same time.

    This is the same comment that Pascal programmers made about C back in the early 80's. The reason C is so successful (and Pascal is not) is that it can do almost everything that assembly language can do. So, when a generation of people trained in Pascal, FORTRAN and PL/I started doing systems programming, they dumped assembly in favour of C.

    I'm betting the same will happen with C++. A new generation of programmers trained in Java will want to write systems code in an object oriented language, but will be prevented from using Java due to its non-deterministic nature. The obvious choice will be C++.

    In other words, your perceived weakness is actually a strength.

    --
    Changes aren't permanent, but change is.
  98. GNU IA32? by Straker+Skunk · · Score: 1

    ObFanboyComment: GO GCC!!! :-D

    Would this be the one with Intel's new IA32 backend? It'll be great to finally see gcc kick VC++ butt on x86 binary quality. I'm getting this strange urge to recompile everything -O9 -mpentium }:-)

    --
    iSKUNK!
    1. Re:GNU IA32? by zudark · · Score: 2

      Nope, the new_ia32_branch is not folded into
      2.95. If you cvs co it its version number is
      2.96 right now, but I don't know when the merge
      will occur.

  99. Re:C++ is overcomplicated by Anonymous Coward · · Score: 0

    weakness or not, I don't like C++,
    & I don't like OOP, but I don't dislike
    C++ because it's an OO language(OO capabile if you
    will). While I do dislike OOL's because they lead
    too OO code, which in my view is akin to lazzy programing for lazzy programers, I dislike C++
    simply because somehow they managed to take a
    very elagent language like C and made it into
    the world's biggest cludge. The source code's cludgy, the binary code that get spitout is cludgier still with all the mnagleing going on.

    I suffer from a programing defect, I simply can't
    trust "Objects" unless I know(and by know, I mean
    "I"! told it to do it, not some bloody parent object of somesuch) whats going on at all times.
    C is simple & explicet. No intersecting mapings
    of raw procedural code into sudo object's for
    programer's who have the capability of beliveing
    or at least useing the "lie" that an OOL lets
    a programmer belive(use?)

    ahh well, rant rant rant.

  100. RH6 RPM's? by sirsky · · Score: 1

    Does anyone know where I can get RedHat 6.0 RPM's for this? Would be greatly appreciated!

    1. Re:RH6 RPM's? by Core+Dump · · Score: 1

      Probably not for a while.
      What's wrong with compiling it yourself?
      I think you can figure out how to email me ;)

      --
      I think you can figure out how to email me ;)
      PGP Key:
  101. C++==High Reliability by Anonymous Coward · · Score: 0

    It's far easier to build reliable systems in C++ than in C. It's merely your ignorance of the language and its use that creates problems--I used to think the same way, but experience taught me otherwise.

  102. demo coders by Anonymous Coward · · Score: 0

    First off, C++ is not an OO language... it supports lots of non-OO styles (such as generic programming via templates, with the STL being a good example of non-OO code that's virtually impossible to do well in C).

    Second, the main reason some people object to C++ is that they simply have no programming experience in any program large than a simple demo or textbook examples.

    1. Re:demo coders by Anonymous Coward · · Score: 0

      Yes, STL is a bad implementation of parametric polymorphism. Please, go back to bed.

  103. Re:Performance of compiled binaries compared to pg by Anonymous Coward · · Score: 0

    I'm not sure... performance is mostly better, but the new Cygnus IA-32 backend isn't in this version... It'll increase performance about 30% over 2.95

  104. Re:pgcc -> gcc? by Anonymous Coward · · Score: 0

    PGCC and GCC (ex-egcs) pretty much share code heavily, but it's unlikely that the compilers will merge, they are made for different reasons..
    And the developers of each have not really had an exactly romantic co-existance.

    - Faktorii

  105. Re:Kernel and GCC 2.95 by dvdeug · · Score: 2

    When the alias issue came up, Linus told the compiler people to use a set of rules to turn aliasing off, instead of immediately correcting the bug in Linux (it is a bug, because it violates ANSI C aliasing rules, and he was shown at least two ways to fix it.)

    That's not good engineering, to write buggy code and expect other people to fix the tools to work around your buggy code.

  106. STL is one of C++'s pluses by Anonymous Coward · · Score: 0

    I have found STL to be one of the most useful features of C++. Period. It allows the programmer to work more closely to the problem desgin, and get very efficient code to boot.

    For decades, thousands of programmers have re-invented the wheel by providing their own implementations of containers and container algorithms. It's time to grow up, and and STL is an excellent start.

    If you need help using STL I suggest you look to the Stroustrup as it has excellent explanation and examples. Additionally, the folks c.l.c++.mod are happy to answer questions.

    1. Re:STL is one of C++'s pluses by Anonymous Coward · · Score: 0

      It allows the programmer to work more closely to the problem desgin

      No. It doesn't. It lets you abstract the problem more nicely without worrying about casting and other nuisances -- in fact, I like the general idea. But it's too baroque for my taste (I have the same complaint about Swing -- I appreciate the cleverness of having general mouse listeners for example, but the handful of cases where it's actually useful doesn't outweigh the incredible nuisance of having to include an internal class in every object that gets mouse events) The final straw was that having to work out why someone else's hash table is losing entries when the actual implementation is hidden behind so many templates and inline methods that I can't debug it is not my idea of useful. Maybe you enjoy this..

      Daniel

  107. Re:Kernel and GCC 2.95 by Maciej+Stachowiak · · Score: 1

    That's not good engineering, to write buggy code and expect other people to fix the tools to work around your buggy code.

    Especially given that there's a flag to turn off the code that exposes the bug already. Linus was still pissed because he wanted the performance benefits of strict aliasing without having to clean up the kernel code to not violate the aliasing rules.

  108. Glacial compile times and huge dwarf builds by BruceQ · · Score: 1

    The problem I have with egcs/gcc is the the glacial compile times!! I am running on a dual 450 PIII and it takes 5 times as long to compile (no optmisations) my app as it does on PPC/Codewarior on a single CPU PCC/300. This is probably because of the lack of precompiled headers. Much of the source includes the headers to libs and system stuff.

    However, ***BY FAR*** the most absurd thing about the GCC tool chain for x86 is DWARF!! My 4 Meg executable swells to a mindboggling 130MB of god-knows-what nonsense when the -g flag is on.
    Linking this beast takes ~8 minutes and nearly brings my 256MB RAM machine to its knees.

    The thought of porting my company's code to Linux is very appealing, however I can't even imagine the pain of doing so with the current tools. My only option seems to be spend some undetermined amount of time fixing the tool chain --- if its even possible -- something tells be if it was a reasonable task to fix the Broken-As-Designed aspects of the gcc/dwarf and the debugger (no doubt all three would need to be revd.) then someone would have done so long before now...

    I am not trying the flame-bait the GCC/Linux is the holy grail crowd here, but the current situation sucks for those of us with beefy apps.

    --BQ
    "Bruce Q Hammond" bruceq@gobe.n.o.s.p.a.m.com

    1. Re:Glacial compile times and huge dwarf builds by PugMajere · · Score: 1
      It sounds like you're not happy with compile times, either. You really need to look into "make -j2" to get any performance benefit on a dual processor machine.

      By default, GNU Make only deals with 1 "job" at a time, so it's only really using one processor. When you run "make -j2" you set that limit to two active jobs, and then you actually use your improved machine.

      The speed improvement is stunning, btw.

  109. Chill support by Anonymous Coward · · Score: 0

    Ok, this thing supports chill...
    I apologize for asking such a stupid question here, but... could someone please tell me what kind of language chill is, and where I could find more information about it? Thanks in advance!

  110. Re:Kernel and GCC 2.95 by JoeBuck · · Score: 2

    To compile Linux 2.2x with gcc 2.95, you need to include the flag -fno-strict-aliasing

    This flag is needed if you have code that does things like try to read an array of longs as an array of shorts, without using unions.

  111. HP-UX by Anonymous Coward · · Score: 0

    I'm having problems compiling it for HP-UX 10.20. Any ideas?

    (I haven't actually finished downloading it yet, but I just know I'm gonna have problems with this crappy OS ;-)

  112. Thanks by Anonymous Coward · · Score: 3

    Since nobody here have really said it I want
    to say thank you to all developers that spend
    their time making gcc better.

    I use gcc/g++ almost every day and I am very pleased with it.

  113. Web pages by Jonas+�berg · · Score: 3
    Now then, before anyone comes bursting in saying that we havn't updated the web pages: look again. I just updated the web pages on www.gnu.org and I hope that the steering committee will update their web pages on gcc.gnu.org soon too. It's the idea that eventually the web pages from gcc.gnu.org will magically appear att www.gnu.org, possibly with some small stylistic changes, but we havn't gotten around to this yet.

    As a blatant plug I'd also like to say that the GNU Webmasters need more help. Do write me if you want to help out.

  114. Congratulations by Zerbey · · Score: 1

    A big thank you to all the developers of the GCC compilers :-)

    *we're not worthy, we're not worthy, we're not worthy....*

  115. pgcc -> gcc? by pli · · Score: 2

    Will pgcc be merged with gcc, or what is that status of that?

    1. Re:pgcc -> gcc? by JoeBuck · · Score: 2

      The need for pgcc should be eliminated by the new IA32 back end (which isn't in 2.95, but will be in the next major release).

      I don't believe that there is any copyright assignment issue for the pgcc patches. The real issue was that Intel didn't do things "right". Their way of modifying the compiler was to ignore the distinction between the front end (portable) and the back end (processor specific), so pgcc is an Intel-only compiler as a result. This means that the Intel patches would need to be redesigned. Some of them already have been and are already in.

  116. mingw32 by Nerant · · Score: 1

    building for mingw32 as i write this

    --
    Be kind. There are too many mean people out there already.
  117. Kernel and GCC 2.95 by Kento · · Score: 5

    I was just reading the linux kernel mailing list (which i *just* resubscribed to) and apparently, the kernel won't compile correctly with gcc 2.95. Here's an excerpt:

    The linux kernel violates certain aliasing
    rules specified in the ANSI/ISO
    standard. Starting with GCC 2.95, the gcc
    optimizer by default relies on these
    rules to produce more efficient code and thus
    will produce malfunctioning
    kernels. To work around this
    problem, the flag -fno-strict-aliasing must be
    added to the CFLAGS variable in
    the main kernel Makefile.

    Disclaimer: I haven't downloaded the new compiler and so I haven't tried it yet, but keep this in mind when you upgrade gcc.

    1. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 0

      I believe glibc suffers from it, but it's actually a pretty rare problem... It appears a __typealias extension will be added soon to allow manual control.

    2. Re:Kernel and GCC 2.95 by yogiBear · · Score: 1

      I compiled the 2.2.10 kernel yesterday and it
      works without a glitch, despite the fact that I used gcc-2.9.5. I've only got few warnings
      like xxxx: variable 'result' might be used
      without being initialized, but everything else
      worked fine. On the other hand, I haven't included
      modules which I don't need (SMP, SCSI, Ethernet).
      Some of those still may blow up, but the fortunate
      majority (we with the cheap PCS) will never have
      to discover that.

    3. Re:Kernel and GCC 2.95 by sterwill · · Score: 3

      I understand how easy it is to criticize Linus from behind the security blanket you call anonymitiy, and I can't disagree with all your points, but I'm not sure you understand Linus's position (perhaps you understand it better than I). The kernel tree is very large, and I wouldn't want the job of coordinating all the development that goes on within. Just reading the linux-kernel mailing list is a job in itself.

      I admire the job Linus is doing but I can't imagine a single person doing it any better. I've always found Linus a humble guy in the end. Show him something's really better your way, and in a way he can understand (considering the other work he does), and often he'll adopt it. He's made an occasional policy or kernel decision that might have upset me, but coordinating public devlopment can be acurately described as herding cats. It's an endless series of tradeoffs because everyone wants to go his own way; sometimes patches are rejected, sometimes the ideas they implement become the center of rabid e-mail debate, and sometimes they're quietly applied.

      The sheer numbers of developers and different directions and goals of each pulls on Linus in a different direction. I've used Linux on a variety of architectures, and I wish Linus would focus more on keeping 'stable' release of the kernel clean across all architectures--these are the quality issues of which you speak. 2.2.10, for example, won't compile on an Alpha.

      I can't say I see Linus holding back the performance of the kernel for reasons of stubbornness. Most of the performance improvement suggestions he receives present a risk in other areas (stability, security, portability). He's making trade-offs, and I personally admire most of the decisions he's making.

      Scalability and performance issues are most often encountered when trying to make the Intel architecture do something it was never intended to do: be scalable. I think it's unfortunate that so many people continue to squeeze this twenty-year-old idol of cruft into such places when cleaner and better engineered alternatives exist.

      I think he's doing a very good job.

    4. Re:Kernel and GCC 2.95 by Anonymous Coward · · Score: 2

      That's nothing new. The same statement was also true for egcs 1.1.x. Compiling the Linux kernel using egcs was always dangerous since it relies on some non-standard aspects (bugs) of gcc 2.7.2.

    5. Re:Kernel and GCC 2.95 by Kento · · Score: 3

      The 2.0 kernels used illegal inline assembly constructs which just happened to work with GCC 2.7.2 . You could always compile the 2.2 kernels with whatever compiler you wanted. From what I can tell, this is different, and it affects all kernels, including the 2.2 ones.

  118. Upgrade consequences? by Rob+Kaper · · Score: 2
    This is all great of course (new releases always are), but would it have been too hard to post a little note with upgrade consequences with this announcement?

    Will it break my system? What are the requirements? Will the kernels compile with it? how about other large projects such as X, Apache, Gnome, KDE.

    The compiler is one of the core programs if you don't use binaries so the over-all stability of your Linux box greatly depends on a good combination of compiler, libraries, includes etc etc.

    Is there a HOW-TO available on this? (not just saying: "old goes with old and new with new" or providing upgrade instructions for a specific compiler but more a general document describing how some parts of the system work together and how to make optimal use of that)

    1. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

      Yes, but you're forgetting that GCC and Linux are noble beasts and are therefore impervious to any problems. Problems that you, or others, may have experienced in the past is due to some other factor. For example, I had a problem with my Linux box once, for a brief moment of stupidity I thought that Linux itself was at fault - until I discovered that is, THAT THE GUY NEXT DOOR HAD A WINDOWS BOX!!!! GRRR! It seems that Windows' aura was seeping through the (very thin) walls and affecting my Linux machine.

      Never again shall I doubt the holliness of Linux and GCC.

    2. Re:Upgrade consequences? by Anonymous Coward · · Score: 1

      Do you really need to upgrade? Wouldn't it make more sense to wait for your favorite Linux distribution to carry the updated GCC? Unless you're a GCC developer, or there's a bug in your compiler that you need fixed, why bother?

    3. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

      What's up, dude?

      Lost your sense of humour, hmm?

    4. Re:Upgrade consequences? by Anonymous Coward · · Score: 0

      It is funny to see Winbloze users reacting to Linux's eventual world domination. I guess the last desparate gasp of a group of morons who worship crappy software should be expected. Rather pathetic really.

  119. You are correct, but I have a question... by Anonymous Coward · · Score: 0

    Are there any commercial compilers that are as retargettable as gcc?

    Cygwin's original claim to fame was the embedded software realm (you pretty much HAVE to have a retargetable compiler)....

  120. Re:C++ is overcomplicated by Agent+Smith · · Score: 1

    I would imagine that any programming language would be difficult for this person, given his lamentable inability to spell even the most simple English words, let alone arrange them into intelligible sentences.

    Mnagleing, indeed. Lazy people don't check their output. Heaven knows what "lazzy" people do.

  121. XFree 3.3.4 compiled with gcc 2.95 by sdt · · Score: 1

    What concerns X, I just compiled XFree 3.3.4 with gcc 2.95. It compiled fine and it runs a hellovalot faster. This is on an Pentium II-400, with Linux 2.2.10 (also compiled with gcc 2.95 and -fno-strict-aliasing). EGCS Team: Well Done! This is a *great* improvement ;). -- sdt

  122. CodeFusion, GNUPro, and GPL by jaffray · · Score: 1

    Maybe buy GCC from Cygnus? I have heard that the commertial version that they sell (GNUPro and CodeFusion) has new IA32 backend already installed. According to the ad for the CodeFusion on the Cygnus site, it has 80% speed increase over "net egcs" for Pentium II for specific benchmarks

    Hmmm. That might be worth checking out. I wish they had an evaluation version; as Mindcraft recently reminded us, benchmarks can be used to prove anything. Also, I would like to know whether GNUPro contains the same compiler technology as CodeFusion, since I couldn't care less about their IDE.

    I assume that purchasers of CodeFusion and GNUPro aren't free to redistribute source. Given that part of their product is a derivative of gcc/egcs, how do they manage that without violating GPL?
  123. Sterring. Rhymes with herring. by Russ+Nelson · · Score: 2

    Hmmm.... You'd think slash would be integrated with a spel checker by now.
    -russ

    --
    Don't piss off The Angry Economist
  124. need more using software engineering language by Anonymous Coward · · Score: 1

    Sigh. Too bad more aren't using a software engineering OO language since there is now such a rich choice available under the GNU license: Eiffel, Ada95, Sather (among the safest). Even Modula3, Smalltalk, and Java are worthy of consideration. Here's some URLs,
    GNU Eiffel
    GNU Ada95
    GNU Sather