Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Andreas Schwab
Tue, 06 Oct 1992 14:47
Bugs in indent 1.6
Author: Andreas Schwab
Date: Tue, 06 Oct 1992 14:47
Date: Tue, 06 Oct 1992 14:47
75 lines
3054 bytes
3054 bytes
There are (atleast :-) three bugs in indent 1.6:
* args.c (struct pro pro, !BERKLEY_DEFAULTS): default values for -fc1
and -nfc1 doesn't correspondent with the -gnu setting
* io.c (read_stdin): pointer into stdinptr.data must be relocated each
time stdinptr.data is reallocated
* indent.c (indent):
`sizeof (char)' is read by `lexi' as ident, lparen, decl, rparen in the
following example (`decl' should be `ident', i think):
----------- test.c
f ()
{
do
g ();
while (sizeof (char));
}
----------
Output of: indent test.c -st
----------
f ()
{
do
g ();
while (sizeof (char));
/**INDENT** Error@6: Stmt nesting error. */
}
/**INDENT** Error@7: Stuff missing from end of file. */
----------
With the patch in indent.c this error disappears.
diff -u2r orig/args.c ./args.c
--- orig/args.c Mon Aug 10 21:32:22 1992
+++ ./args.c Tue Aug 25 20:56:20 1992
@@ -317,5 +317,5 @@
{"fbx", PRO_FONT, 0, ONOFF_NA, (int *) &boxcomf, &exp_fbx},
{"fb", PRO_FONT, 0, ONOFF_NA, (int *) &bodyf, &exp_fb},
- {"fc1", PRO_BOOL, true, ON, &format_col1_comments, &exp_fc1},
+ {"fc1", PRO_BOOL, false, ON, &format_col1_comments, &exp_fc1},
{"fca", PRO_BOOL, false, ON, &format_comments, &exp_fca},
{"fc", PRO_FONT, 0, ONOFF_NA, (int *) &scomf, &exp_fc},
@@ -354,5 +354,5 @@
{"neei", PRO_BOOL, false, OFF, &extra_expression_indent, &exp_eei},
{"nei", PRO_BOOL, true, OFF, &else_if, &exp_ei},
- {"nfc1", PRO_BOOL, true, OFF, &format_col1_comments, &exp_fc1},
+ {"nfc1", PRO_BOOL, false, OFF, &format_col1_comments, &exp_fc1},
{"nfca", PRO_BOOL, false, OFF, &format_comments, &exp_fca},
{"nip", PRO_SETTINGS, 0, ONOFF_NA, (int *) "-ip0\0", &exp_nip},
diff -u2r orig/indent.c ./indent.c
--- orig/indent.c Wed Aug 19 23:32:28 1992
+++ ./indent.c Sat Oct 3 16:23:58 1992
@@ -573,4 +573,5 @@
if (parser_state_tos->last_token == decl
|| (parser_state_tos->last_token == ident
+ && parser_state_tos->last_rw != rw_sizeof
&& parser_state_tos->last_rw != rw_return))
parser_state_tos->noncast_mask |=
diff -u2r orig/io.c ./io.c
--- orig/io.c Sat Aug 15 00:09:16 1992
+++ ./io.c Tue Aug 25 21:32:58 1992
@@ -488,7 +488,7 @@
stdinptr.data = (char *) xmalloc (size + 1);
stdinptr.size = 0;
- p = stdinptr.data;
do
{
+ p = stdinptr.data + stdinptr.size;
while (stdinptr.size < size)
{
--
Andreas Schwab
schwab@ls5.informatik.uni-dortmund.de
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