home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16050 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.9 KB

  1. Xref: sparky comp.lang.c++:16050 comp.std.c++:1529
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!rtech!odinba!dan
  4. From: dan@BofA.COM (Dan Brockman)
  5. Subject: something nasty report
  6. Message-ID: <1992Nov10.192157.20810@BofA.com>
  7. Sender: dan@BofA.com (Dan Brockman)
  8. Organization: Bank of America, Capital Products, RMTG #5906
  9. Date: Tue, 10 Nov 92 19:21:57 GMT
  10. Lines: 52
  11.  
  12. re:
  13. During a C++ compilation ...
  14. "Leg1.c", line 87: internal <<AT&T C++ Translator 
  15. 2.1.03 08/31/90>> error: bus error (or something 
  16. nasty like that)
  17. Compilation failed
  18.  ------------------------
  19.  
  20.  I am grateful to all the people who helped me resolve
  21.  this problem.  Many contributed advice and suggestions,
  22.  but especially helpful were Gary Angel and
  23.  Shankar Unni.  
  24.  
  25.  The error message may be symptomatic of a broad range
  26.  of problems, for many tentative diagnoses were 
  27.  nominated.  I found one problem.  It occurs in that
  28.  part of the C++ translator called "cfront".  It is 
  29.  not clear to me whether cfront contains a bug.
  30.  
  31.  The line of source at which the problem occurs is such as
  32.  
  33.         SwapLeg = (LegPtr)calloc(1, LEG_SIZE);
  34.  
  35.  Here is the fix:
  36.  
  37.     //#define LEG_SIZE sizeof(Leg)
  38.     #define LEG_SIZE sizeof(struct leg)
  39.  
  40.  We had this pattern of code in six or eight programs.
  41.  The line number cited in the error message is the
  42.  closing bracket "}" of the function in which the
  43.  error occurs.
  44.   
  45.  
  46.  ----------------------------------------------
  47.  
  48.  Hypotheses proven false.
  49.  
  50.  1.  Big program uses too much memory.
  51.  2.  ESQL causes it.
  52.  3.  Unused argument list variables  cause it.
  53.  4.  CC "+w" option causes.
  54.  5.  Error occurs in cpp.
  55.  6.  Error does not occur in cfront.
  56.       
  57. DanB
  58.  
  59. -- 
  60.  --------------------------------------------------------------
  61.  Daniel Brockman             tel 415-953-0406, fax 415-622-2892
  62.  Bank of America, Dept 5906, 555 Calif St
  63.  San Francisco 94104 USA    email uunet!odinba!dan dan@BofA.COM
  64.