|
|
Subscribe / Log in / New account

Nice example...

Nice example...

Posted Nov 18, 2008 17:24 UTC (Tue) by daney (guest, #24551)
In reply to: BSD Dissatisfied with gcc... why? by jzbiciak
Parent article: pcc seeks contributions to reach 1.0 milestone

That is an excellent example, one that clearly shows that the GCC developers being responsive by carefully analysing the situation and changing their compiler to address the concerns raised by the Linux kernel developers.

There was some initial contention, but once the situation was well understood, the desired results were obtained. There are some who argue based on the axiom that GCC == BAD, but I don't think it holds in the case you mention.


to post comments

Nice example...

Posted Nov 18, 2008 17:38 UTC (Tue) by jzbiciak (guest, #5246) [Link] (1 responses)

I don't come down on the side of "GCC == BAD" at all. What I was pointing out, though, is that the C standard and its wiggle room are at odds with things like kernels and multithreaded programs. If you can only rely on what the C standard guarantees, then it's much harder to do useful things efficiently.

More aggressive optimizations will rely on this wiggle room and sometimes break things. That's a headache for kernel developers. Sure, GCC may get fixed, but breaking to begin with was an annoyance. If the break causes subtle problems, diagnosing the issue could be very difficult.

This is where a simpler compiler can be more effective. If it provides very simple semantics (rather than the extraordinary wiggle room the standard provides), it becomes easier to reason about the correctness of the program. Yes, it's less portable to other compilers, but as long as the compiler itself is portable, what's the issue?

After all, you don't see many Linux builds that don't use GCC (although there are a few...).

Nice example...

Posted Nov 18, 2008 19:07 UTC (Tue) by dlang (guest, #313) [Link]

multi-threaded programming will be in much better shape (standards wise) in a couple years.

defining this area is one of the bigger changes in the new POSIX, C, and C++ standards that are nearing completion (POSIX is complete, C is expected next year, C++ sometime after that)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds