home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10817 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.1 KB  |  50 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!mcrware!adam
  3. From: adam@microware.com (Adam Goldberg)
  4. Subject: BC++ 3.1 bug?
  5. Message-ID: <1992Nov20.174122.2729@microware.com>
  6. Sender: news@microware.com
  7. Nntp-Posting-Host: ren
  8. Organization: Microware Systems Corp., Des Moines, Iowa
  9. Date: Fri, 20 Nov 1992 17:41:22 GMT
  10. Lines: 38
  11.  
  12. The following produces an interesting error:
  13.  
  14. #include <dos.h>
  15. #include <mem.h>
  16.  
  17. void main(void)
  18. {
  19.    unsigned short far *ppm, *dest;
  20.  
  21.    if(NULL == (ppm = (unsigned short far *)farmalloc(1024)))
  22.    {
  23.       error message...
  24.    }
  25.  
  26.    if(NULL == (dest = (unsigned short far *)farmalloc(1024)))
  27.    {
  28.       error message...
  29.    }
  30.  
  31.  
  32. This produces an error on the _second_ farmalloc(), "suspicious
  33. pointer conversion". (not on the first...)
  34.  
  35. On the other hand, if I change the declaration line to:
  36.  
  37.    unsigned short far *ppm;
  38.    unsigned short far *dest;
  39.  
  40. I get no such error.
  41.  
  42. Any ideas, or is this a real bug?
  43.  
  44.  
  45. -- 
  46. Adam G.
  47. adamg@microware.com, or ...!uunet!mcrware!adamg
  48. The above is not to be construed in any way as the official or unofficial
  49. statements of Microware, or any Microware employees.
  50.