home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16459 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.5 KB

  1. Xref: sparky comp.lang.c++:16459 comp.std.c++:1591
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!alt!gkrishna
  4. From: gkrishna@alt.uucp (Gopal-Krishnan)
  5. Subject: Re: something nasty 
  6. Message-ID: <1992Nov17.172633.25665@alt.uucp>
  7. Keywords: cfront nasty 
  8. Organization: Unisys Corp, Camarillo, CA - 93010.
  9. Date: Tue, 17 Nov 1992 17:26:33 GMT
  10. Lines: 57
  11.  
  12. >dan@BofA.com (Dan Brockman) writes in <1992Nov1.224626.771@BofA.com>:
  13.  
  14. > "DealStruct.c", line 165: internal <<AT&T C++ Translator
  15. > 2.1.03 08/31/90>> error: bus error (or something nasty
  16. > like that)
  17. > Compilation failed 
  18.  
  19.   In the summary I did not see the following as 'possible causes'. And so,
  20.  here I am posting this:
  21.  
  22. 1. When the nesting level is too high cfront dies this gracefully!. 
  23.   That is if you have code that says 
  24.   {
  25.    blabla
  26.    {
  27.     blabla
  28.     { ...etc.
  29.   I think the AT&T C++ Language System Release Notes or some such document gives
  30.   this number as 20 for 386 machines etc. So, if your program has more than 
  31.   that specified number of open '{', then you get this internal error.
  32.   Even if your code does not have that many '{, remember that each variable
  33.   definition midway your code introduces a scope. 
  34.     I mean things like 
  35.        x= y+z;
  36.        int a = 4; //this introduces a scope.
  37.  
  38.   Way out:
  39.   Just get rid of those unnecessary scopes you have, if any.
  40.   Make extra functions by splitting your code, if that is possible.
  41.   Better still, ask your compiler guy. He should be able to give a fix for you.
  42.   My compiler guy was able to give me a fix (after some time though).
  43.  
  44. 2. When your code has complicated 
  45.    while ... for ... while loops the same thing happens.
  46.   
  47.   Way out: 
  48.   Same as above.
  49.   
  50. 3 onwards:
  51.   I had a few more cases when I got this 'nasty' thing. They are complicated
  52.   code, and hence is not possible to generalise and post them. 
  53.  
  54.   Anyway, try workarounds by modifying your code. 
  55.   In most cases, it is possible.
  56.  
  57. My compiler guy said, that he has a handful of signal handlers installed in 
  58. the system, and when any of them is invoked, this msg is printed.
  59. That is why the msg sounds so nasty. 
  60. -----------------------------------------------------------------------
  61. Gopal Krishnan          | internet: alt!gkrishna@uunet.UU.net
  62. Unisys Corporation      | voice: 805-389-4446
  63. Open Systems Group      | fax  : 805-389-4420
  64. 5155, Camino Ruiz       | Take charge. Somebody has to do it - 
  65. Camarillo, CA - 93012.  |  It might as well be you.
  66. -----------------------------------------------------------------------
  67.  
  68.  
  69.