This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch [i386/winnt.c]: Make local functions in winnt.c static


Hello,

This patch makes local function in i386/winnt.c static. In addition
to keeping the names local, it allows -funit-at-a-time optimization of
these functions.

Bootstrapped and tested on 1686-pc-mingw32, c,c++,f77,objc.  The build
also included my proposed change to i386.c to allow -funit-at-a-time to
work. 

2003-10-16  Danny Smith  <dannysmith@users.sourceforge.net>

	* config/i386/winnt.c (gen_stdcall_suffix): Make static
	(gen_fastcall_suffix): Likewise.
	(i386_pe_dllexport_p): Likewise.
	(i386_pe_dllimport_p): Likewise.
	(i386_pe_mark_dllexport): Likewise.
	(i386_pe_mark_dllimport): Likewise.
	(i386_pe_asm_named_section): Fix formatting.


Index: winnt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/winnt.c,v
retrieving revision 1.58
diff -c -3 -p -r1.58 winnt.c
*** winnt.c	7 Oct 2003 09:36:34 -0000	1.58
--- winnt.c	16 Oct 2003 01:27:17 -0000
*************** Software Foundation, 59 Temple Place - S
*** 47,58 ****
  */
  
  static tree associated_type (tree);
! const char * gen_stdcall_suffix (tree);
! const char * gen_fastcall_suffix (tree);
! int i386_pe_dllexport_p (tree);
! int i386_pe_dllimport_p (tree);
! void i386_pe_mark_dllexport (tree);
! void i386_pe_mark_dllimport (tree);
  
  /* This is we how mark internal identifiers with dllimport or dllexport
     attributes.  */
--- 47,58 ----
  */
  
  static tree associated_type (tree);
! static const char * gen_stdcall_suffix (tree);
! static const char * gen_fastcall_suffix (tree);
! static int i386_pe_dllexport_p (tree);
! static int i386_pe_dllimport_p (tree);
! static void i386_pe_mark_dllexport (tree);
! static void i386_pe_mark_dllimport (tree);
  
  /* This is we how mark internal identifiers with dllimport or dllexport
     attributes.  */
*************** associated_type (tree decl)
*** 182,188 ****
  
  /* Return nonzero if DECL is a dllexport'd object.  */
  
! int
  i386_pe_dllexport_p (tree decl)
  {
    tree exp;
--- 182,188 ----
  
  /* Return nonzero if DECL is a dllexport'd object.  */
  
! static int
  i386_pe_dllexport_p (tree decl)
  {
    tree exp;
*************** i386_pe_dllexport_p (tree decl)
*** 208,214 ****
  
  /* Return nonzero if DECL is a dllimport'd object.  */
  
! int
  i386_pe_dllimport_p (tree decl)
  {
    tree imp;
--- 208,214 ----
  
  /* Return nonzero if DECL is a dllimport'd object.  */
  
! static int
  i386_pe_dllimport_p (tree decl)
  {
    tree imp;
*************** i386_pe_dllimport_name_p (const char *sy
*** 308,314 ****
  /* Mark a DECL as being dllexport'd.
     Note that we override the previous setting (eg: dllimport).  */
  
! void
  i386_pe_mark_dllexport (tree decl)
  {
    const char *oldname;
--- 308,314 ----
  /* Mark a DECL as being dllexport'd.
     Note that we override the previous setting (eg: dllimport).  */
  
! static void
  i386_pe_mark_dllexport (tree decl)
  {
    const char *oldname;
*************** i386_pe_mark_dllexport (tree decl)
*** 350,356 ****
  
  /* Mark a DECL as being dllimport'd.  */
  
! void
  i386_pe_mark_dllimport (tree decl)
  {
    const char *oldname;
--- 350,356 ----
  
  /* Mark a DECL as being dllimport'd.  */
  
! static void
  i386_pe_mark_dllimport (tree decl)
  {
    const char *oldname;
*************** i386_pe_mark_dllimport (tree decl)
*** 406,416 ****
     prefix consisting of FASTCALL_PREFIX and a suffix consisting of an
     atsign (@) followed by the number of bytes of arguments.  */
  
! const char *
  gen_fastcall_suffix (tree decl)
  {
    int total = 0;
- 
    const char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
    char *newsym;
  
--- 406,415 ----
     prefix consisting of FASTCALL_PREFIX and a suffix consisting of an
     atsign (@) followed by the number of bytes of arguments.  */
  
! static const char *
  gen_fastcall_suffix (tree decl)
  {
    int total = 0;
    const char *asmname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
    char *newsym;
  
*************** gen_fastcall_suffix (tree decl)
*** 446,452 ****
     suffix consisting of an atsign (@) followed by the number of bytes of
     arguments */
  
! const char *
  gen_stdcall_suffix (tree decl)
  {
    int total = 0;
--- 445,451 ----
     suffix consisting of an atsign (@) followed by the number of bytes of
     arguments */
  
! static const char *
  gen_stdcall_suffix (tree decl)
  {
    int total = 0;
*************** i386_pe_asm_named_section (const char *n
*** 717,730 ****
        *f++ ='r';
      }
    else	
!   {
!     if (flags & SECTION_CODE)
!       *f++ = 'x';
!     if (flags & SECTION_WRITE)
!       *f++ = 'w';
!     if (flags & SECTION_PE_SHARED)
!       *f++ = 's';
!   }
  
    *f = '\0';
  
--- 716,729 ----
        *f++ ='r';
      }
    else	
!     {
!       if (flags & SECTION_CODE)
!         *f++ = 'x';
!       if (flags & SECTION_WRITE)
!         *f++ = 'w';
!       if (flags & SECTION_PE_SHARED)
!         *f++ = 's';
!     }
  
    *f = '\0';
  

http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]