home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / bug / 3249 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.4 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!usit.uio.NO!h.b.furuseth
  2. From: h.b.furuseth@usit.uio.NO
  3. Newsgroups: gnu.gcc.bug
  4. Subject: Bugs in gcc-2.3.3/cccp.c
  5. Date: 25 Jan 1993 21:19:01 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 86
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gcc@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301252049.AAdurin12217@durin.uio.no>
  12.  
  13. A few bug fixes to cccp - 
  14.  
  15. Page 1: There was a jump into the block, past the initialization of
  16. variable already_output.
  17.  
  18. Page 2: finclude() called trigraph_pcp without a terminating \0 in the
  19. input string.
  20.  
  21. Page 3: A little memory leak.
  22.  
  23.  
  24. *** cccp.c~    Mon Jan 25 21:35:51 1993
  25. --- cccp.c    Mon Jan 25 21:33:57 1993
  26. ***************
  27. *** 3159,3163 ****
  28.      */
  29.     for (kt = directive_table; kt->length > 0; kt++) {
  30. !     if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length)) {
  31.         register U_CHAR *buf;
  32.         register U_CHAR *limit;
  33. --- 3159,3165 ----
  34.      */
  35.     for (kt = directive_table; kt->length > 0; kt++) {
  36. !     if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length))
  37. !  old_linenum:
  38. !  {
  39.         register U_CHAR *buf;
  40.         register U_CHAR *limit;
  41. ***************
  42. *** 3170,3175 ****
  43.         int keep_comments;
  44.   
  45. -     old_linenum:
  46.         limit = ip->buf + ip->length;
  47.         unterminated = 0;
  48. --- 3172,3175 ----
  49.  
  50.  
  51.  
  52. *** cccp.c~    Mon Jan 25 21:35:51 1993
  53. --- cccp.c    Mon Jan 25 21:33:57 1993
  54. ***************
  55. *** 4115,4118 ****
  56. --- 4115,4126 ----
  57.     }
  58.   
  59. +   if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
  60. +       /* Backslash-newline at end is not good enough.  */
  61. +       || (fp->length > 1 && fp->buf[fp->length - 2] == '\\')) {
  62. +     fp->buf[fp->length++] = '\n';
  63. +     missing_newline = 1;
  64. +   }
  65. +   fp->buf[fp->length] = '\0';
  66.     /* Close descriptor now, so nesting does not use lots of descriptors.  */
  67.     close (f);
  68. ***************
  69. *** 4127,4138 ****
  70.       trigraph_pcp (fp);
  71.   
  72. -   if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
  73. -       /* Backslash-newline at end is not good enough.  */
  74. -       || (fp->length > 1 && fp->buf[fp->length - 2] == '\\')) {
  75. -     fp->buf[fp->length++] = '\n';
  76. -     missing_newline = 1;
  77. -   }
  78. -   fp->buf[fp->length] = '\0';
  79.     output_line_command (fp, op, 0, enter_file);
  80.     rescan (op, 0);
  81. --- 4135,4138 ----
  82.  
  83.  
  84.  
  85. *** cccp.c~    Mon Jan 25 21:35:51 1993
  86. --- cccp.c    Mon Jan 25 21:33:57 1993
  87. ***************
  88. *** 4578,4581 ****
  89. --- 4578,4582 ----
  90.       }
  91.     }
  92. +   free (line_command);
  93.   }
  94.   
  95.  
  96.