Redundancies often reveal bugs

retard re at tard.com.invalid
Fri Oct 15 07:50:39 PDT 2010


Thu, 14 Oct 2010 17:21:39 +0200, Andrej Mitrovic wrote:

> Don't forget pragma abuse! I don't have the exact source, but I've seen
> code like this in several medium-big sized projects:
> 
> // Shut up stupid compiler warnings
> #pragma (DISABLE, 5596)
> #pragma (DISABLE, 5597)
> #pragma (DISABLE, 5598)
> 
> So not only do people neglect warnings, they get annoyed with them but
> then decide the best solution is to silence the compiler.
> 
> OTOH in some cases the warnings are caused by 3rd party libraries and
> the warnings are re-enabled for user-code again (I've seen this latter
> case used in Scintilla or Scite).

Ah, true. Makes one wonder, if C/C++ as systems programming languages are 
not limiting the programmer unlike impractical high level languages, why 
do you need to hack the simple warning/error system..


More information about the Digitalmars-d mailing list