home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / fixed300.arj / CPMS0003.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-02  |  992 b   |  42 lines

  1. #if 0
  2. Date: Mon, 22 Apr 91 18:14:14 -0400
  3. From: ima.isc.com!andya@uunet.uu.net
  4. Subject: compiler crash on bad code
  5. Status: Fixed in 3.0
  6. #endif
  7.  
  8. //The following incorrect code crashes the 2.18 version of ztc
  9. //when run under windows, even with the -e switch.
  10.  
  11. typedef long integer;
  12.  
  13. typedef integer boolean;
  14.  
  15. // #include "defs.h"
  16.  
  17. class c
  18. {
  19.     boolean isEmpty(void) { return isEmpty; };
  20.     int aMember;
  21. }
  22.  
  23.  
  24. #if 0
  25. make test.obj
  26. ztc -e -br -p -u -c -ml -D__ZTC__ -g  -W -DMS_WINDOWS -DARCHIVER -DZORTECH18 test.cpp
  27. ztcpp1r -e -p -u -ml -D__ZTC__ -g -DMS_WINDOWS -DARCHIVER -DZORTECH18 -oF:\ztc_9F7.tmp test.cpp
  28. }
  29. ^
  30. preprocessed(10) : Error: cannot implicitly convert
  31. from:<memptr c><far C++ func() returning><long>
  32. to  :<long>
  33.  
  34. DOS/16M: [35] General Protection Fault at 00FD:F348 map=0080  in ZTCPP1R.EXE
  35. code=0000 ss=00F5 ds=011D es=0000 
  36. ax=000F bx=0000 cx=0009 dx=001A sp=13C2 bp=1402 si=000F di=0012 
  37. --- errorlevel 255
  38.  
  39. --- errorlevel 255
  40.  
  41. #endif
  42.