By this logic it should be easy to convince people using gcc to switch to Xcode.
How to convince any C developer to dump gcc and use clang
21–30 of 97 posts
Re: How to convince any C developer to dump gcc and use clang
#22I've had 40% speed-ups on some math-heavy C code simply by switching from gcc to clang.
I had a 2x speedup a few years ago on math-heavy code (FFTs) by switching from gcc 4.2 to gcc 3.4 -- apparently there was a known issue in gcc's optimizer where it would flag too many values as "keep this in a register" and end up spending lots of time moving data to and from the "register overflow space" on the stack. (I don't know if this has been fixed -- as I said, it was a few years ago that I ran into this issue.)
Re: How to convince any C developer to dump gcc and use clang
#23you're saying I should port all my code just because the ui is more user-friendly? what about performance, options, special warnings, builtins, and everything else? I've been using gcc for a while now, and every time I use it I found a new feature. It's rock solid and had never let me down.
Or do you use a lot of gcc extensions?
Re: How to convince any C developer to dump gcc and use clang
#24Since when is it hard to find and correct syntax errors that are preventing your C code from compiling?
Re: How to convince any C developer to dump gcc and use clang
#25Re: How to convince any C developer to dump gcc and use clang
#26Re: How to convince any C developer to dump gcc and use clang
#27Earlier quoted context omitted.
Proprietary extensions are one reason that gcc is so hard to unseat. You're always better off writing standard code if you want it to work in ten years.
Hardly proprietary. Apple gave the "block" patches to the gcc team. Gcc isn't interested in them, they are holding off for some future C++ syntax, though I don't see how that helps C programmers. Meanwhile, I got seduced by gcc's nested functions which are not supported by clang. Apparently they are non-trivial in clang so won't appear soon if at all. Two incompatible mechanisms for function decomposition are annoyin…
Re: How to convince any C developer to dump gcc and use clang
#28Some stuff is starting to emerge, but we're still largely dependent on tests to catch stupid mistakes. When I'm chasing down a bug, it would be nice to have a variety of tools to throw at the problem.
Re: How to convince any C developer to dump gcc and use clang
#29I'm not sure this screenshot is convincing. Do you see the last error message? In the second error message clang found that `horisontal` doesn't exist and suggested `horizontal`. That's fair enough. The last error message actually assumes the code said `horizontal`, which is just horribly wrong. I think that the compiler should never ever report an error on code that is not really there. What would happen if the prog…
It's quite common and accepted for compilers to make assumptions about the rest of the code, and for those to be wrong if your code is broken. For example, the C# compiler has a large number of passes, and it will do no more passes after seeing an a previous pass. Thus, you might knock a file down to one error, fix that error, and then find that you have a couple dozen more errors.
Indeed. Most annoyingly, many "modern" C compilers still attempt to muddle onward by replacing unknown types with "int".
Re: How to convince any C developer to dump gcc and use clang
#30Earlier quoted context omitted.
Hardly proprietary. Apple gave the "block" patches to the gcc team. Gcc isn't interested in them, they are holding off for some future C++ syntax, though I don't see how that helps C programmers. Meanwhile, I got seduced by gcc's nested functions which are not supported by clang. Apparently they are non-trivial in clang so won't appear soon if at all. Two incompatible mechanisms for function decomposition are annoyin…
I think he meant to say "non-standard".
By all means play with closures. I don't mean to discourage the original poster from experimenting. I am just pointing out some irony in the context of gcc and clang. Clang is forced to implement nonstandard gcc extensions. I do not see this as a good thing for languages that are essential building blocks and which people have put a lot of work into standardizing. Software development doesn't need to be so ephemeral.