Goodbye robot - hello marasmus - page 9

 
C-4:
Such people are weirdos. Such eggheads fight the compiler like a windmill without understanding the main thing: the compiler is your ally! Rejoice when the compiler swears at potentially unsafe code fragments. Rejoice even if the application crashes right after launch with an error string. But God forbid that you get an unmanageable code when there are no errors or warnings and the program seems to work well but every now and then strange glitches occur whose cause cannot be tracked anywhere. At such moments you get vapid and start dreaming about errors like "invalid pointer" or "division by zero".

It turns out that a compiler is not the same as a compiler. Here, Intel's C/C++ compiler is an ally. You want remarks, you're welcome. If you don't want any, no problem. If you want to disable some remarks, just name them.

But there are other compilers. Some of them are "whatever you want".

It's appropriate to rejoice when the compiler is an ally, when it 'listens'. And also when it manages to refrain from creating unmanageable code. Then thoughts of such bizarre dreams won't even cross your mind.

 
Andrei01:

Again, professional programmers usually don't look at warnings because they know the logic of the compiler and compilers are useless for testing code functionality.

Professional programmers turn on the maximum alert level and all the warnings (NOT remarks, only warnings) and make sure that the code compiles without a single warning. Some especially zealous also turn on a special mode where a warning is treated by the compiler as an error and the code simply won't compile if there is even a single warning.
 

I understand that some people will get hysterical after getting acquainted with static analyzers.

But only after that some understand what a compiler must (exactly must) do. It's 2014 and ordinary compilers are at least 10 years behind in quality control and concentrate only on optimizations.

For information: the Intel C++ compiler is still recovering from its defects - it constantly generates internal compiler errors on our projects. That is, it doesn't chew large projects and produces its own errors. And the myths about its extraordinary optimizing properties are outdated too - all the rest have tightened their optimization levels greatly.

In such a dangerous and suicidal language as C++, so many keys and compilation switches are given for confident programmers to compile tons of ancient and copied from nowhere code without nervous cramps :)

 
Andrei01:

...

Again, professional programmers don't usually look at warnings...

Into the annals!!!
 
C-4:
Into the annals!!!
Can you say something on the merits of the case without clowning around?
 
Renat:
Can you recommend an environment, compiler and settings for optimal writing (speed/optimisation + error detection etc.) of C++ and other languages?
 
bxa29869:
Can you recommend an environment, compiler and settings for optimal writing (speed/optimisation + error detection, etc.) of C++ and other languages?
Visual Studio how?
 
_new-rena:
Visual Studio how?

I've tried it, it's fine. But I have nothing to compare it with. I would like to program on an optimal infrastructure.

My programs are small, rarely source code exceeds a hundred kilobytes. I would like a recommendation for such amateur versions. I'm not talking about large projects.

 
bxa29869:
Can you recommend environment, compiler and settings for optimal writing (speed/optimization + error detection, etc.) programs in C++ and other languages?

Recommended for professional development:

  • Visual Studio 2012 and higher
  • The free CPP Check is a must
  • PVS Studio (full paid, you may get a cheap version of CPP Cat) - strongly recommended if we are talking about professional development
  • PC Lint (paid but cheap, good for automated runs, fast, requires an add-in or gui like VisualLint)
  • C++ Memory Validator (there is a whole package of programs, it is paid, not expensive, very good for resource optimization and searching for errors)
  • Intel Parallel Studio (expensive, slow, buggy as a compiler, useless on mass market, good for math libraries, good for deep tuning, I do not like it very much)
 
Thank you! It turns out at the same time that the regular Visual Studio compiler can be left unchanged.