Warnings in crtstuff.c
Jeffrey A Law
law@upchuck.cygnus.com
Tue Mar 23 00:41:00 GMT 1999
This fixes a couple problems with -Wstrict-prototypes and supersedes
a December patch from HJ.
* crtstuff.c: Use ANSI function definitions. Fix minor whitespace
problems.
Index: crtstuff.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/crtstuff.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 crtstuff.c
*** crtstuff.c 1999/02/27 22:21:58 1.17
--- crtstuff.c 1999/03/23 08:38:54
*************** typedef void (*func_ptr) (void);
*** 157,163 ****
static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[];
static void
! __do_global_dtors_aux ()
{
static func_ptr *p = __DTOR_LIST__ + 1;
static int completed = 0;
--- 157,163 ----
static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[];
static void
! __do_global_dtors_aux (void)
{
static func_ptr *p = __DTOR_LIST__ + 1;
static int completed = 0;
*************** __do_global_dtors_aux ()
*** 182,188 ****
/* Stick a call to __do_global_dtors_aux into the .fini section. */
static void __attribute__ ((__unused__))
! fini_dummy ()
{
asm (FINI_SECTION_ASM_OP);
__do_global_dtors_aux ();
--- 182,188 ----
/* Stick a call to __do_global_dtors_aux into the .fini section. */
static void __attribute__ ((__unused__))
! fini_dummy (void)
{
asm (FINI_SECTION_ASM_OP);
__do_global_dtors_aux ();
*************** fini_dummy ()
*** 198,204 ****
call in another function. */
static void
! frame_dummy ()
{
static struct object object;
if (__register_frame_info)
--- 198,204 ----
call in another function. */
static void
! frame_dummy (void)
{
static struct object object;
if (__register_frame_info)
*************** frame_dummy ()
*** 206,212 ****
}
static void __attribute__ ((__unused__))
! init_dummy ()
{
asm (INIT_SECTION_ASM_OP);
frame_dummy ();
--- 206,212 ----
}
static void __attribute__ ((__unused__))
! init_dummy (void)
{
asm (INIT_SECTION_ASM_OP);
frame_dummy ();
*************** init_dummy ()
*** 227,233 ****
to switch to the .text section. */
static void __do_global_ctors_aux ();
! void __do_global_ctors ()
{
#ifdef INVOKE__main /* If __main won't actually call __do_global_ctors
then it doesn't matter what's inside the function.
--- 227,234 ----
to switch to the .text section. */
static void __do_global_ctors_aux ();
! void
! __do_global_ctors (void)
{
#ifdef INVOKE__main /* If __main won't actually call __do_global_ctors
then it doesn't matter what's inside the function.
*************** asm (INIT_SECTION_ASM_OP); /* cc1 doesn'
*** 257,263 ****
file-scope static-storage C++ objects within shared libraries. */
static void
! __do_global_ctors_aux () /* prologue goes in .init section */
{
#ifdef FORCE_INIT_SECTION_ALIGN
FORCE_INIT_SECTION_ALIGN; /* Explicit align before switch to .text */
--- 258,264 ----
file-scope static-storage C++ objects within shared libraries. */
static void
! __do_global_ctors_aux (void) /* prologue goes in .init section */
{
#ifdef FORCE_INIT_SECTION_ALIGN
FORCE_INIT_SECTION_ALIGN; /* Explicit align before switch to .text */
*************** __do_global_ctors_aux () /* prologue goe
*** 279,285 ****
static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[];
void
! __do_global_dtors ()
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
--- 280,286 ----
static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[];
void
! __do_global_dtors (void)
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
*************** __do_global_dtors ()
*** 296,302 ****
after libgcc.a, and hence can't call libgcc.a functions directly. That
can lead to unresolved function references. */
void
! __frame_dummy ()
{
static struct object object;
if (__register_frame_info)
--- 297,303 ----
after libgcc.a, and hence can't call libgcc.a functions directly. That
can lead to unresolved function references. */
void
! __frame_dummy (void)
{
static struct object object;
if (__register_frame_info)
*************** char __EH_FRAME_BEGIN__[] = { };
*** 360,366 ****
static func_ptr __CTOR_END__[];
static void
! __do_global_ctors_aux ()
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
--- 361,367 ----
static func_ptr __CTOR_END__[];
static void
! __do_global_ctors_aux (void)
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
*************** __do_global_ctors_aux ()
*** 370,376 ****
/* Stick a call to __do_global_ctors_aux into the .init section. */
static void __attribute__ ((__unused__))
! init_dummy ()
{
asm (INIT_SECTION_ASM_OP);
__do_global_ctors_aux ();
--- 371,377 ----
/* Stick a call to __do_global_ctors_aux into the .init section. */
static void __attribute__ ((__unused__))
! init_dummy (void)
{
asm (INIT_SECTION_ASM_OP);
__do_global_ctors_aux ();
*************** init_dummy ()
*** 419,425 ****
before we start to execute any of the user's code. */
static void
! __do_global_ctors_aux () /* prologue goes in .text section */
{
asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY;
--- 420,426 ----
before we start to execute any of the user's code. */
static void
! __do_global_ctors_aux (void) /* prologue goes in .text section */
{
asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY;
*************** static func_ptr __CTOR_END__[];
*** 445,451 ****
extern void __frame_dummy (void);
#endif
void
! __do_global_ctors ()
{
func_ptr *p;
#ifdef EH_FRAME_SECTION_ASM_OP
--- 446,452 ----
extern void __frame_dummy (void);
#endif
void
! __do_global_ctors (void)
{
func_ptr *p;
#ifdef EH_FRAME_SECTION_ASM_OP
*************** extern const struct section *
*** 521,527 ****
static void __reg_frame_ctor () __attribute__ ((constructor));
static void
! __reg_frame_ctor ()
{
static struct object object;
const struct section *eh_frame;
--- 522,528 ----
static void __reg_frame_ctor () __attribute__ ((constructor));
static void
! __reg_frame_ctor (void)
{
static struct object object;
const struct section *eh_frame;
*************** __reg_frame_ctor ()
*** 538,544 ****
static void __dereg_frame_dtor () __attribute__ ((destructor));
static
! void __dereg_frame_dtor ()
{
const struct section *eh_frame;
--- 539,546 ----
static void __dereg_frame_dtor () __attribute__ ((destructor));
static
! void
! __dereg_frame_dtor (void)
{
const struct section *eh_frame;
More information about the Gcc-patches
mailing list