aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/c-lex.c17
-rw-r--r--gcc/config/sparc/gmon-sol2.c12
-rw-r--r--gcc/config/svr4.h2
-rw-r--r--gcc/cppexp.c14
-rw-r--r--gcc/fix-header.c6
-rw-r--r--gcc/pexecute.c6
-rw-r--r--gcc/print-rtl.c1
-rw-r--r--gcc/profile.c14
-rw-r--r--gcc/scan.c3
9 files changed, 55 insertions, 20 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 1b5b484..dc56b86 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -23,6 +23,16 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "rtl.h"
#include "tree.h"
@@ -135,6 +145,9 @@ static int end_of_file;
static int nextchar = -1;
#endif
+#ifdef HANDLE_SYSV_PRAGMA
+static int handle_sysv_pragma PROTO((int));
+#endif /* HANDLE_SYSV_PRAGMA */
static int skip_white_space PROTO((int));
static char *extend_token_buffer PROTO((char *));
static int readescape PROTO((int *));
@@ -894,7 +907,7 @@ linenum:
/* This function has to be in this file, in order to get at
the token types. */
-int
+static int
handle_sysv_pragma (token)
register int token;
{
@@ -1264,7 +1277,7 @@ yylex ()
{
register struct resword *ptr;
- if (ptr = is_reserved_word (token_buffer, p - token_buffer))
+ if ((ptr = is_reserved_word (token_buffer, p - token_buffer)))
{
if (ptr->rid)
yylval.ttype = ridpointers[(int) ptr->rid];
diff --git a/gcc/config/sparc/gmon-sol2.c b/gcc/config/sparc/gmon-sol2.c
index 9b41c64..2a5b898 100644
--- a/gcc/config/sparc/gmon-sol2.c
+++ b/gcc/config/sparc/gmon-sol2.c
@@ -44,6 +44,7 @@ static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91";
#include <string.h>
#include <limits.h>
#include <unistd.h>
+#include <fcntl.h>
#if 0
#include "sparc/gmon.h"
@@ -95,7 +96,9 @@ static int s_scale;
#define MSG "No space for profiling buffer(s)\n"
-monstartup(lowpc, highpc)
+static void moncontrol();
+
+void monstartup(lowpc, highpc)
char *lowpc;
char *highpc;
{
@@ -201,7 +204,7 @@ _mcleanup()
else
progname++;
- sprintf(buf, "%s/%d.%s", profdir, getpid(), progname);
+ sprintf(buf, "%s/%ld.%s", profdir, getpid(), progname);
proffile = buf;
} else {
proffile = "gmon.out";
@@ -279,11 +282,10 @@ asm(".global _mcount; _mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
/* This is for compatibility with old versions of gcc which used mcount. */
asm(".global mcount; mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
-static internal_mcount(selfpc, frompcindex)
+static void internal_mcount(selfpc, frompcindex)
register char *selfpc;
register unsigned short *frompcindex;
{
- register char *nextframe;
register struct tostruct *top;
register struct tostruct *prevtop;
register long toindex;
@@ -410,7 +412,7 @@ overflow:
* profiling is what mcount checks to see if
* all the data structures are ready.
*/
-moncontrol(mode)
+static void moncontrol(mode)
int mode;
{
if (mode) {
diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h
index c7fac28..e9ee03b 100644
--- a/gcc/config/svr4.h
+++ b/gcc/config/svr4.h
@@ -892,7 +892,7 @@ do { \
register unsigned char *_limited_str = (unsigned char *) (STR); \
register unsigned ch; \
fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP); \
- for (; ch = *_limited_str; _limited_str++) \
+ for (; (ch = *_limited_str); _limited_str++) \
{ \
register int escape; \
switch (escape = ESCAPES[ch]) \
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index bbb43ac..347ee39 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -31,14 +31,23 @@ Written by Per Bothner 1994. */
extern char *xmalloc PARAMS ((unsigned));
extern char *xrealloc PARAMS ((void *, unsigned));
-#ifdef MULTIBYTE_CHARS
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef MULTIBYTE_CHARS
#include <locale.h>
#endif
#if HAVE_LIMITS_H
# include <limits.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include <stdio.h>
@@ -306,7 +315,6 @@ cpp_lex (pfile, skip_evaluation)
int skip_evaluation;
{
register int c;
- register int namelen;
register struct token *toktab;
enum cpp_token token;
struct operation op;
@@ -360,7 +368,7 @@ cpp_lex (pfile, skip_evaluation)
It is mostly copied from c-lex.c. */
{
register int result = 0;
- register num_chars = 0;
+ register int num_chars = 0;
unsigned width = MAX_CHAR_TYPE_SIZE;
int wide_flag = 0;
int max_chars;
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index 3b5ec3a..3e23503 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -1081,8 +1081,10 @@ main (argc, argv)
int inf_fd;
struct stat sbuf;
int c;
- int i, done;
- const char *cptr, **pptr;
+#ifdef FIXPROTO_IGNORE_LIST
+ int i;
+#endif
+ const char *cptr;
int ifndef_line;
int endif_line;
long to_read;
diff --git a/gcc/pexecute.c b/gcc/pexecute.c
index f9690e4..38b5874 100644
--- a/gcc/pexecute.c
+++ b/gcc/pexecute.c
@@ -29,6 +29,9 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef IN_GCC
#include "gansidecl.h"
@@ -637,6 +640,9 @@ pfinish ()
extern int execv ();
extern int execvp ();
+#ifdef IN_GCC
+extern char * my_strerror();
+#endif
int
pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 60405bd..8db02fe 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -231,6 +231,7 @@ void
print_inline_rtx (outf, x, ind)
FILE *outf;
rtx x;
+ int ind;
{
int oldsaw = sawclose;
int oldindent = indent;
diff --git a/gcc/profile.c b/gcc/profile.c
index 80f4549..81841fb 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -42,6 +42,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "rtl.h"
#include "flags.h"
#include "insn-flags.h"
@@ -184,11 +191,6 @@ instrument_arcs (f, num_blocks, dump_file)
int num_instr_arcs = 0;
rtx insn;
- int neg_one = -1;
- int zero = 0;
- int inverted;
- rtx note;
-
/* Instrument the program start. */
/* Handle block 0 specially, since it will always be instrumented,
but it doesn't have a valid first_insn or branch_insn. We must
@@ -679,7 +681,7 @@ branch_prob (f, dump_file)
bb_graph[i].first_insn = insn;
}
else if (code == NOTE)
- ;
+ {;}
if (code == CALL_INSN)
{
diff --git a/gcc/scan.c b/gcc/scan.c
index 4f575b3..65689f7 100644
--- a/gcc/scan.c
+++ b/gcc/scan.c
@@ -49,7 +49,7 @@ sstring_append (dst, src)
sstring *src;
{
register char *d, *s;
- register count = SSTRING_LENGTH(src);
+ register int count = SSTRING_LENGTH(src);
MAKE_SSTRING_SPACE(dst, count + 1);
d = dst->ptr;
s = src->base;
@@ -84,6 +84,7 @@ int
scan_string (fp, s, init)
register FILE *fp;
register sstring *s;
+ int init;
{
int c;
for (;;)