home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:16050 comp.std.c++:1529
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!rtech!odinba!dan
- From: dan@BofA.COM (Dan Brockman)
- Subject: something nasty report
- Message-ID: <1992Nov10.192157.20810@BofA.com>
- Sender: dan@BofA.com (Dan Brockman)
- Organization: Bank of America, Capital Products, RMTG #5906
- Date: Tue, 10 Nov 92 19:21:57 GMT
- Lines: 52
-
- re:
- During a C++ compilation ...
- "Leg1.c", line 87: internal <<AT&T C++ Translator
- 2.1.03 08/31/90>> error: bus error (or something
- nasty like that)
- Compilation failed
- ------------------------
-
- I am grateful to all the people who helped me resolve
- this problem. Many contributed advice and suggestions,
- but especially helpful were Gary Angel and
- Shankar Unni.
-
- The error message may be symptomatic of a broad range
- of problems, for many tentative diagnoses were
- nominated. I found one problem. It occurs in that
- part of the C++ translator called "cfront". It is
- not clear to me whether cfront contains a bug.
-
- The line of source at which the problem occurs is such as
-
- SwapLeg = (LegPtr)calloc(1, LEG_SIZE);
-
- Here is the fix:
-
- //#define LEG_SIZE sizeof(Leg)
- #define LEG_SIZE sizeof(struct leg)
-
- We had this pattern of code in six or eight programs.
- The line number cited in the error message is the
- closing bracket "}" of the function in which the
- error occurs.
-
-
- ----------------------------------------------
-
- Hypotheses proven false.
-
- 1. Big program uses too much memory.
- 2. ESQL causes it.
- 3. Unused argument list variables cause it.
- 4. CC "+w" option causes.
- 5. Error occurs in cpp.
- 6. Error does not occur in cfront.
-
- DanB
-
- --
- --------------------------------------------------------------
- Daniel Brockman tel 415-953-0406, fax 415-622-2892
- Bank of America, Dept 5906, 555 Calif St
- San Francisco 94104 USA email uunet!odinba!dan dan@BofA.COM
-