delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/06/16:56:35

From: Jeff Weeks <pweeks AT execulink DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Turning off warnings using #pragma, is it possible?
Date: 6 Apr 1997 20:16:37 GMT
Organization: Code X Software
Lines: 35
Message-ID: <5i90b5$fla@nr1.toronto.istar.net>
NNTP-Posting-Host: ppp17.io.execulink.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I remember reading, under the Turbo C++ help files, that you could turn
off warnings for a certain code block using a certain #pragma option. 
Is this possible under DJGPP?

You see, I've got a code block that, more or less, looks like this:

for(i = 0; i < 256; i++) {
  sine[i] = sin(i*2*3.1415926/256.0)*256;
  cosine[i] = cos(i*2*3.1415926/256.0)*256;
}

In other words, it's calculating the sin/cos values and putting them
into a 24.8 fixed math int.  But, ofcourse, DJGPP complains about
converting a double to an int... but if I typecast to an int with

sine[i] = (int)...

It does calculate the sine/cosine tables right (they all seem to be 0). 
So I'd like to turn off warnings for this little block.  Is it possible?

If not, what's the command line switch to disable this warning globally?

Thanks,
Jeff Weeks

PS: My usenet server is going nuts again so could you please repond via
email if possible (hopefully this message actually gets through!).

--------------------------------------------
            - Code X Software -
       Programming to a Higher Power
  
  email: mailto:pweeks AT execulink DOT com
  web:	 http://www.execulink.com/~pweeks/
--------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019