Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by h.b.furuseth
Tue, 26 Jan 1993 02:19
Bugs in gcc-2.3.3/cccp.c
Author: h.b.furuseth
Date: Tue, 26 Jan 1993 02:19
Date: Tue, 26 Jan 1993 02:19
85 lines
2575 bytes
2575 bytes
A few bug fixes to cccp -
Page 1: There was a jump into the block, past the initialization of
variable already_output.
Page 2: finclude() called trigraph_pcp without a terminating \0 in the
input string.
Page 3: A little memory leak.
*** cccp.c~ Mon Jan 25 21:35:51 1993
--- cccp.c Mon Jan 25 21:33:57 1993
***************
*** 3159,3163 ****
*/
for (kt = directive_table; kt->length > 0; kt++) {
! if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length)) {
register U_CHAR *buf;
register U_CHAR *limit;
--- 3159,3165 ----
*/
for (kt = directive_table; kt->length > 0; kt++) {
! if (kt->length == ident_length && !strncmp (kt->name, ident, ident_length))
! old_linenum:
! {
register U_CHAR *buf;
register U_CHAR *limit;
***************
*** 3170,3175 ****
int keep_comments;
- old_linenum:
-
limit = ip->buf + ip->length;
unterminated = 0;
--- 3172,3175 ----
*** cccp.c~ Mon Jan 25 21:35:51 1993
--- cccp.c Mon Jan 25 21:33:57 1993
***************
*** 4115,4118 ****
--- 4115,4126 ----
}
+ if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
+ /* Backslash-newline at end is not good enough. */
+ || (fp->length > 1 && fp->buf[fp->length - 2] == '\\')) {
+ fp->buf[fp->length++] = '\n';
+ missing_newline = 1;
+ }
+ fp->buf[fp->length] = '\0';
+
/* Close descriptor now, so nesting does not use lots of descriptors. */
close (f);
***************
*** 4127,4138 ****
trigraph_pcp (fp);
- if ((fp->length > 0 && fp->buf[fp->length - 1] != '\n')
- /* Backslash-newline at end is not good enough. */
- || (fp->length > 1 && fp->buf[fp->length - 2] == '\\')) {
- fp->buf[fp->length++] = '\n';
- missing_newline = 1;
- }
- fp->buf[fp->length] = '\0';
-
output_line_command (fp, op, 0, enter_file);
rescan (op, 0);
--- 4135,4138 ----
*** cccp.c~ Mon Jan 25 21:35:51 1993
--- cccp.c Mon Jan 25 21:33:57 1993
***************
*** 4578,4581 ****
--- 4578,4582 ----
}
}
+ free (line_command);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads