Commit 757e6639 by Richard Kenner Committed by Richard Kenner

c-decl.c (start_function): Don't warn if old prototype is builtin that's not in C's namespace.

	* c-decl.c (start_function): Don't warn if old prototype is builtin
	that's not in C's namespace.
	* libgcc2.c (_varargs): Update definition of __builtin_saveregs.
	(_bb): Add prototype for ctime.
	* config/alpha/osf.h (TRANSFER_FROM_TRAMPOLINE): Add missing protos.

From-SVN: r38980
parent 9e7adcb3
Sat Jan 13 07:30:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* c-decl.c (start_function): Don't warn if old prototype is builtin
that's not in C's namespace.
* libgcc2.c (_varargs): Update definition of __builtin_saveregs.
(_bb): Add prototype for ctime.
* config/alpha/osf.h (TRANSFER_FROM_TRAMPOLINE): Add missing protos.
Sat Jan 13 09:53:32 MET 2001 Jan Hubicka <jh@suse.cz> Sat Jan 13 09:53:32 MET 2001 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_fp_comparison_arithmetics_cost, * i386.c (ix86_fp_comparison_arithmetics_cost,
......
...@@ -5837,12 +5837,18 @@ start_function (declspecs, declarator, prefix_attributes, attributes) ...@@ -5837,12 +5837,18 @@ start_function (declspecs, declarator, prefix_attributes, attributes)
/* Optionally warn of old-fashioned def with no previous prototype. */ /* Optionally warn of old-fashioned def with no previous prototype. */
if (warn_strict_prototypes if (warn_strict_prototypes
&& TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0 && TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0
&& !(old_decl != 0 && TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0)) && !(old_decl != 0
&& (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
|| (DECL_BUILT_IN (old_decl)
&& ! C_DECL_ANTICIPATED (old_decl)))))
warning ("function declaration isn't a prototype"); warning ("function declaration isn't a prototype");
/* Optionally warn of any global def with no previous prototype. */ /* Optionally warn of any global def with no previous prototype. */
else if (warn_missing_prototypes else if (warn_missing_prototypes
&& TREE_PUBLIC (decl1) && TREE_PUBLIC (decl1)
&& !(old_decl != 0 && TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0) && !(old_decl != 0
&& (TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != 0
|| (DECL_BUILT_IN (old_decl)
&& ! C_DECL_ANTICIPATED (old_decl))))
&& ! MAIN_NAME_P (DECL_NAME (decl1))) && ! MAIN_NAME_P (DECL_NAME (decl1)))
warning_with_decl (decl1, "no previous prototype for `%s'"); warning_with_decl (decl1, "no previous prototype for `%s'");
/* Optionally warn of any def with no previous prototype /* Optionally warn of any def with no previous prototype
......
/* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1. /* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
...@@ -128,10 +128,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -128,10 +128,13 @@ Boston, MA 02111-1307, USA. */
/* Attempt to turn on access permissions for the stack. */ /* Attempt to turn on access permissions for the stack. */
#define TRANSFER_FROM_TRAMPOLINE \ #define TRANSFER_FROM_TRAMPOLINE \
extern void __enable_execute_stack PARAMS ((void *)); \
\
void \ void \
__enable_execute_stack (addr) \ __enable_execute_stack (addr) \
void *addr; \ void *addr; \
{ \ { \
extern int mprotect PARAMS ((const void *, size_t, int)); \
long size = getpagesize (); \ long size = getpagesize (); \
long mask = ~(size-1); \ long mask = ~(size-1); \
char *page = (char *) (((long) addr) & mask); \ char *page = (char *) (((long) addr) & mask); \
......
/* More subroutines needed by GCC output code on some machines. */ /* More subroutines needed by GCC output code on some machines. */
/* Compile this one with gcc. */ /* Compile this one with gcc. */
/* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc. 2001 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -1457,8 +1457,8 @@ asm ("___builtin_saveregs:"); ...@@ -1457,8 +1457,8 @@ asm ("___builtin_saveregs:");
asm (" .end __builtin_saveregs"); asm (" .end __builtin_saveregs");
#else /* not __mips__, etc. */ #else /* not __mips__, etc. */
void * __attribute__ ((__noreturn__)) void * ATTRIBUTE_NORETURN
__builtin_saveregs (void) __builtin_saveregs ()
{ {
abort (); abort ();
} }
...@@ -1517,7 +1517,7 @@ BLOCK_PROFILER_CODE ...@@ -1517,7 +1517,7 @@ BLOCK_PROFILER_CODE
#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */ #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */
#include <stdio.h> #include <stdio.h>
char *ctime (); char *ctime PARAMS ((const time_t *));
#include "gbl-ctors.h" #include "gbl-ctors.h"
#include "gcov-io.h" #include "gcov-io.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment