News for hackers. Stuff that matters.
Re:Microsoft to C99 Developers: Use ISO C++ by ComputerGuru on Monday May 07, 2012 @01:12PM (#3939894)
We've been using a solution/workaround for ages because it was obvious MS was never going to play ball.

Just install ICC (the Intel compiler). It hooks into Visual Studio, is a better compiler for both C and C++ than MSVC, works really well, produces really fast binaries, and does all its magic in the backend. Nothing changes for you, the developer.

It's both free for non-commercial development and paid for commercial dev, which makes perfect sense to me.

Re:Microsoft to C99 Developers: Use ISO C++ by dman on Monday May 07, 2012 @01:25PM (#3939963)
Do you also instruct your customers to run on Intel chips for optimal performance?
Re:Microsoft to C99 Developers: Use ISO C++ by dman on Monday May 07, 2012 @01:31PM (#3940004)
For those of you downvoting - please read http://www.agner.org/optimize/blog/read.php?i=49#49 . There is a long documented history of ICC producing suboptimal code for AMD processors. AMD currently has 19.1% market share and I am genuinely curious what people who use ICC do for that part of the market. I guess if you are selling an end to end solution or developing inhouse tools this is not a problem.
Re:Microsoft to C99 Developers: Use ISO C++ by ComputerGuru on Monday May 07, 2012 @02:16PM (#3940203)
We regularly test on AMD chipsets (even really old ones). It's a matter of tweaking the optimization profiles, instead of selecting max for everything.
Re:Microsoft to C99 Developers: Use ISO C++ by theatrus2 on Monday May 07, 2012 @01:29PM (#3939986)
A very good point, as ICC is known to produce very bad code (intentionally) when run on AMD systems.
Re:Microsoft to C99 Developers: Use ISO C++ by masklinn on Monday May 07, 2012 @02:28PM (#3940257)
Technically, it does not produce very bad code when run on AMD systems, it produces very bad code for running on AMD systems.
Re:Microsoft to C99 Developers: Use ISO C++ by excuse-me on Monday May 07, 2012 @02:46PM (#3940374)
It avoids using some performance instructions which it uses on the Intel build and which would work identically on AMD.

Their excuse is that they can't guarantee they would work identically on AMD and so resort to much slower un-pipelined code. It's like Ferrari testing a Porsche and only using 1st gear because they can't be sure that other gears would perform in the same way

Re:Microsoft to C99 Developers: Use ISO C++ by xixi77 on Monday May 07, 2012 @02:51PM (#3940399)
There is some truth to that, as it does not do all optimizations that it could; however, in my experience, even on AMD systems, ICC beats MSVC hands down.
Re:Microsoft to C99 Developers: Use ISO C++ by chocolatebunny on Monday May 07, 2012 @01:51PM (#3940100)
have you guys considered mingw? It never seems like mingw gets any love in the real world.
Re:Microsoft to C99 Developers: Use ISO C++ by jlarocco on Monday May 07, 2012 @08:17PM (#3941561)
In my experience, using Mingw in the real world is a mess.

It doesn't play nicely with MSVC++, which is a big problem because most third party libraries on Windows are built with MSVC++ and expect projects using them to be built with MSVC++.

And the only debugger usable with Mingw is raw GDB. The debug format it uses isn't compatible with MSVC++'s debugger. Sure, GDB is very powerful, but it's very difficult to use compared to MSVC++, XCode, and even the GDB front ends on Linux.

Also, there's not much of a build system with Mingw unless you're happy with hand rolled Makefiles or using MSYS. I've never had much luck running MSYS. Maybe it's improved lately, but downloading an arbitrary open source library and trying to run "./configure && make" in MSYS is a crap shoot. Unless the library author has taken steps to make it work it probably won't.

As somebody else said, if you're porting code from Linux that uses a lot of non-standard GCC extensions, GNU Make and autotools then Mingw is tolerable as long as you can develop entirely on Linux and only use MingW for porting and testing.

There are some limited cases where it's actually pretty good, though. For example, the open source version of Qt ships its own version of GCC, GNU Make, etc, and hides the details behind their Qt Creator IDE. If you're using Qt with minimal dependencies outside of Qt, it's a nice setup. Also, GHC and the Ruby "Windows dev kit" do the same thing for compiling/building language extensions.

Re:Microsoft to C99 Developers: Use ISO C++ by pkmays on Monday May 07, 2012 @02:12PM (#3940185)
Unlike ICC, MinGW's gcc.exe is not a drop in replacement for cl.exe. It's a separate compilation environment. The headers are different and often out of date compared to the Windows SDK. Microsoft extensions are not supported so it chokes on newer APIs like DirectX 11.

If you are a Mac or Linux weenie who just wants to port something over to Windows sure, no problem, use MinGW. But good luck getting any Visual Studio devs to rely on what is, for all intents and purposes, a second rate Win32 toolchain.

Re:Microsoft to C99 Developers: Use ISO C++ by ahelwer on Monday May 07, 2012 @02:08PM (#3940170)
I don't know, I tried to use mingw to get hwloc to compile. That was one of the more unpleasant experiences in my dev career.