Re:Git's list of banned C functions
by DaiPlusPlus on Thursday March 04, 2021 @09:59PM
(#26352013)
> disable that useless compiler output pollutio
The compiler is trying to help you write better code - suppressing warnings should not be taken lightly.
Re:Git's list of banned C functions
by badsectoracula on Friday March 05, 2021 @01:56AM
(#26353692)
This is not the same as the regular warnings though, what Visual C++ is doing isn't helping writing better code - it is suggesting to replace standard functions which are available everywhere in code where i actually know what i'm doing with functions that are available to Visual C++ and pretty much nowhere else.
As i wrote in another comment, something that may lead to issues isn't the same as something that will always lead to issues - e.g. if i check a string's length or actually calculate and allocate the necessary memory before calling strcpy it is perfectly fine and safe to use it, but Visual C++ doesn't know about that, it complains like some stupid greenhorn that read somewhere "never use gotos" and then is surprised when he sees some Linux kernel code with gotos everywhere for cleanup, thinking that those people writing the kernel do not know what they're doing.
As long as it is done like in recent versions of Visual C++ where i can disable that useless compiler output pollution with a #define, usually with a snide remark about Visual C++ right above it.