16
General / Re: Problem with running a big-array-of-pixels app
« on: July 20, 2016, 10:23:52 pm »Quote
btw, that statement is not illegal since i've used it
Just because one compiler accepts it does not mean it is valid.
Not all compilers implement the standard correctly. Compilers have bugs. Compilers have extentions to the language. Compilers may accept broken code and just print a warning (or not). Etc etc.
This is why you should always build your code with multiple compilers on multiple platforms with high warning levels enabled (and run other tools (like clang tidy, cppcheck - and others)) to be (reasonably) sure that your code is standard compliant and portable.
I recommend always building all commits with gcc, clang, VS (and sometimes icc) on (at least) Linux and Windows, with (at least) "-Wall -Wextra" (or equivalent "/W4"). More is better... It catches real bugs and keeps your code working broadly :-) and it can be completely automated to happen in the background every time you do a "git commit" :-)
This is what I do myself - and it's worth it in the long run spending a few hours to set up a few virtual machines and a CI system integrated with you DVCS - it pays for itself many times over over the years.