www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - using that much pragma disables in dmd msc build?

reply dennis luehring <dl.soluz gmx.net> writes:
in dmd/src/vcbuild/warnings.h

is it realy a good idea to block the warning from popping up then to fix 
the stuff or are all warnings non fixables?
Jun 04 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.
Jun 04 2013
next sibling parent reply "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Tuesday, June 04, 2013 10:52:56 Walter Bright wrote:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h
 
 is it realy a good idea to block the warning from popping up then to fix
 the stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

That would be an understatement. - Jonathan M Davis
Jun 04 2013
parent Paulo Pinto <pjmlp progtools.org> writes:
Am 04.06.2013 20:00, schrieb Jonathan M Davis:
 On Tuesday, June 04, 2013 10:52:56 Walter Bright wrote:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix
 the stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

That would be an understatement. - Jonathan M Davis

Specially the ones about non standard POSIX calls, but widely accepted functions, with suggestions for Microsoft own extensions.
Jun 04 2013
prev sibling parent reply dennis luehring <dl.soluz gmx.net> writes:
Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?
Jun 04 2013
next sibling parent reply dennis luehring <dl.soluz gmx.net> writes:
Am 05.06.2013 07:14, schrieb dennis luehring:
 Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?

better asked: why global switch of the warnings, are all occurences just wrong?
Jun 04 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 6/4/2013 10:25 PM, dennis luehring wrote:
 Am 05.06.2013 07:14, schrieb dennis luehring:
 Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?

better asked: why global switch of the warnings, are all occurences just wrong?

The file was written by Rainer Schuetze and Mark Mohr. I don't know the specifics, except that none of them in warnings.h found real errors, and frankly were far more annoying than useful when I tried VC++ on dmd with all warnings on.
Jun 04 2013
next sibling parent reply dennis luehring <dl.soluz gmx.net> writes:
Am 05.06.2013 08:04, schrieb Walter Bright:
 On 6/4/2013 10:25 PM, dennis luehring wrote:
 Am 05.06.2013 07:14, schrieb dennis luehring:
 Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?

better asked: why global switch of the warnings, are all occurences just wrong?

The file was written by Rainer Schuetze and Mark Mohr. I don't know the specifics, except that none of them in warnings.h found real errors, and frankly were far more annoying than useful when I tried VC++ on dmd with all warnings on.

i always try to keep my programs on VC++ warning level 4 (3 is default) and warning free - but im not developing compilers (maybe its different) is -Wall on gcc more annoying with the dmd source or better then VC++?
Jun 05 2013
parent Walter Bright <newshound2 digitalmars.com> writes:
On 6/5/2013 12:04 AM, dennis luehring wrote:
 is -Wall on gcc more annoying with the dmd source or better then VC++?

gcc generally has more sensible warnings.
Jun 05 2013
prev sibling parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 05.06.2013 08:04, Walter Bright wrote:
 On 6/4/2013 10:25 PM, dennis luehring wrote:
 Am 05.06.2013 07:14, schrieb dennis luehring:
 Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h

 is it realy a good idea to block the warning from popping up then
 to fix the
 stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?

better asked: why global switch of the warnings, are all occurences just wrong?

The file was written by Rainer Schuetze and Mark Mohr. I don't know the specifics, except that none of them in warnings.h found real errors, and frankly were far more annoying than useful when I tried VC++ on dmd with all warnings on.

Most of the warnings relate to coding style (like warning about unreferenced local variables, signed/unsigned conflicts, etc which Walter often expressed not wanting in D, so I assumed that's even more in C). Others are caused by massive usage of the C preprocessor (like casting constants or using them like normal variables causing the flow analysis to produce warnings). I'm undecided about using bools in arithmetic expression, disabling these warnings was added by Mark. Leaving warnings on, but having no good reason to fix them (but to mute the compiler) just leads to ignore every warning, and that seems more dangerous.
Jun 06 2013
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, June 05, 2013 07:25:11 dennis luehring wrote:
 Am 05.06.2013 07:14, schrieb dennis luehring:
 Am 04.06.2013 19:52, schrieb Walter Bright:
 On 6/4/2013 2:16 AM, dennis luehring wrote:
 in dmd/src/vcbuild/warnings.h
 
 is it realy a good idea to block the warning from popping up then to fix
 the stuff or are all warnings non fixables?

Not all VC warnings are good ideas.

examples?

better asked: why global switch of the warnings, are all occurences just wrong?

I don't know which warnings are disabled in the dmd build, but in my experience, Visual Studio has quite a few annoying and pointless warnings - warnings for things that are completely valid as far as the language is concerned and don't actually cause problems. For instance, it warns about pretty much all implicit conversions to bool, and IIRC, it then likes to warning about explictly casting to bool, forcing you to use a ternary operator for no good reason. In my experience, Visual Studio is _way_ overzealous about warnings. - Jonathan M Davis
Jun 04 2013