This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
misplaced #include in libgcc2.c
- To: egcs-bugs at cygnus dot com
- Subject: misplaced #include in libgcc2.c
- From: Fred Fish <fnf at ninemoons dot com>
- Date: Sun, 12 Oct 1997 08:35:41 -0700 (MST)
It appears to me that <string.h> needs to be included before first use of
string functions like strlen.
Sun Oct 12 08:16:40 1997 Fred Fish <fnf@ninemoons.com>
* libgcc2.c (string.h): Hoist inclusion to occur before first use of
string functions like strlen.
Index: libgcc2.c
===================================================================
RCS file: /cvsroot/gg/egcs/gcc/libgcc2.c,v
retrieving revision 1.1.1.1.4.3
diff -c -r1.1.1.1.4.3 libgcc2.c
*** libgcc2.c 1997/10/11 23:54:47 1.1.1.1.4.3
--- libgcc2.c 1997/10/12 15:28:03
***************
*** 1439,1444 ****
--- 1439,1445 ----
#include "gbl-ctors.h"
#include "gcov-io.h"
+ #include <string.h>
static struct bb *bb_head;
***************
*** 1715,1722 ****
#ifndef MACHINE_STATE_RESTORE
#define MACHINE_STATE_RESTORE(ID)
#endif
-
- #include <string.h>
/* Number of buckets in hashtable of basic block addresses. */
--- 1716,1721 ----