www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Selective Warning Disabling

↑ ↓ ← "Rajiv Bhagwat" <dataflow vsnl.com> writes:
Walter,

Please accept the request to implement:

#pragma warning(disable:2)

to disable selective warnings.
I am not sure whether disabling errors like this is a good idea. (When would
that be useful?)

- Rajiv
Jan 03 2002
↑ ↓ "Walter" <walter digitalmars.com> writes:
You can disable warning 2 from the command line using the switch:
    -w2

"Rajiv Bhagwat" <dataflow vsnl.com> wrote in message
news:a13iif$560$1 digitaldaemon.com...
 Walter,

 Please accept the request to implement:

 #pragma warning(disable:2)

 to disable selective warnings.
 I am not sure whether disabling errors like this is a good idea. (When

 that be useful?)

 - Rajiv

Jan 04 2002
↑ ↓ "Rajiv Bhagwat" <dataflow vsnl.com> writes:
Yes, I know that, but when used in a makefile, it ignores the warnings for
all the files. What is required is that the warnings are to be disabled for
a specific file.

BTW, Ms-Windows code often has the same pragma, there it is disable:C2. You
could leave out that 'C' to take it as DMC warning number. (Any idea about
the 'C' in the first place?)

Also, I noticed that the IDDE does not show the warning number, only the
command line compiler shows it. Any reason?
-Rajiv


"Walter" <walter digitalmars.com> wrote in message
news:a15lj8$31bq$1 digitaldaemon.com...
 You can disable warning 2 from the command line using the switch:
     -w2

 "Rajiv Bhagwat" <dataflow vsnl.com> wrote in message
 news:a13iif$560$1 digitaldaemon.com...
 Walter,

 Please accept the request to implement:

 #pragma warning(disable:2)

 to disable selective warnings.
 I am not sure whether disabling errors like this is a good idea. (When

 that be useful?)

 - Rajiv


Jan 04 2002
↑ ↓ → "Walter" <walter digitalmars.com> writes:
"Rajiv Bhagwat" <dataflow vsnl.com> wrote in message
news:a169ml$cuj$1 digitaldaemon.com...
 Yes, I know that, but when used in a makefile, it ignores the warnings for
 all the files. What is required is that the warnings are to be disabled

 a specific file.

Ok, I understand. I'll add it to the list.
 BTW, Ms-Windows code often has the same pragma, there it is disable:C2.

 could leave out that 'C' to take it as DMC warning number. (Any idea about
 the 'C' in the first place?)

No, Microsoft's design decisions can only be guessed at! <g>
 Also, I noticed that the IDDE does not show the warning number, only the
 command line compiler shows it. Any reason?
 -Rajiv

Probably nobody thought of it.
Jan 05 2002