[BusyBox] mips64 compiler error - busybox 1.0.0-pre3
Junio C Hamano
junkio at cox.net
Fri Sep 12 15:28:21 MDT 2003
>>>>> "DD" == David Douglas <ddouglas at Crossroads.com> writes:
DD> shell/ash.c: In function `init':
DD> shell/ash.c:1681: internal compiler error: in int_mode_for_mode, at
DD> stor-layout.c:292
DD> make: *** [shell/ash.o] Error 1
Somebody suggested "#define inline" but that did not work for
me.
Could people suffering from old compiler (like me) please try
the following?
----------------------------------------------------------------
* Make ask compile under older GCC.
This patch moves structure declarations before their first use.
This solves, at least for me, "internal compiler error: in
int_mode_for_mode" problem people with older GCC have been
reporting since 1.00-pre2. Please do not ask why this
essentially no-op change pleases the compiler; I do not know.
--- a/shell/ash.c 2003-09-01 19:36:17.000000000 -0700
+++ b/shell/ash.c 2003-09-12 10:40:21.000000000 -0700
@@ -550,6 +550,29 @@
/* next character in input buffer */
static char *parsenextc; /* copy of parsefile->nextc */
+
+struct strpush {
+ struct strpush *prev; /* preceding string on stack */
+ char *prevstring;
+ int prevnleft;
+#ifdef CONFIG_ASH_ALIAS
+ struct alias *ap; /* if push was associated with an alias */
+#endif
+ char *string; /* remember the string since it may change */
+};
+
+struct parsefile {
+ struct parsefile *prev; /* preceding file on stack */
+ int linno; /* current line */
+ int fd; /* file descriptor (or -1 if string) */
+ int nleft; /* number of chars left in this line */
+ int lleft; /* number of chars left in this buffer */
+ char *nextc; /* next char in buffer */
+ char *buf; /* input buffer */
+ struct strpush *strpush; /* for pushing strings at this level */
+ struct strpush basestrpush; /* so pushing one is fast */
+};
+
static struct parsefile basepf; /* top level input file */
static char basebuf[IBUFSIZ]; /* buffer for top level input file */
static struct parsefile *parsefile = &basepf; /* current input file */
@@ -1573,28 +1596,6 @@
static int loopnest; /* current loop nesting level */
-struct strpush {
- struct strpush *prev; /* preceding string on stack */
- char *prevstring;
- int prevnleft;
-#ifdef CONFIG_ASH_ALIAS
- struct alias *ap; /* if push was associated with an alias */
-#endif
- char *string; /* remember the string since it may change */
-};
-
-struct parsefile {
- struct parsefile *prev; /* preceding file on stack */
- int linno; /* current line */
- int fd; /* file descriptor (or -1 if string) */
- int nleft; /* number of chars left in this line */
- int lleft; /* number of chars left in this buffer */
- char *nextc; /* next char in buffer */
- char *buf; /* input buffer */
- struct strpush *strpush; /* for pushing strings at this level */
- struct strpush basestrpush; /* so pushing one is fast */
-};
-
/*
* The parsefile structure pointed to by the global variable parsefile
* contains information about the current file being read.
More information about the busybox
mailing list