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]

RE:[Bug bootstrap/11455] New: Bootstrap failure in Cygwin


> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11455
> 
>            Summary: Bootstrap failure in Cygwin
>            Product: gcc
>            Version: 3.4
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P2
>          Component: bootstrap
>         AssignedTo: dannysmith at clear dot net dot nz
>         ReportedBy: kelleycook at wideopenwest dot com
>                 CC: bmj2001 at bellsouth dot net,gcc-bugs at gcc dot gnu dot
>                     org
>  GCC build triplet: i686-pc-cygwin
>   GCC host triplet: i686-pc-cygwin
> GCC target triplet: i686-pc-cygwin
> 
> GCC 3.4 under Cygwin currently fails due to incorrect format specifiers in
> config/i386/winnt.c
> 
> The cause of this failure was Danny Smith's patch located at
> http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01681.html which uses "%D".
> 

This fixes. Okay to check in?

Danny

ChangeLog
2003-07-07  Danny Smith  <dannysmith@users.sourceforege.net>

	PR bootstrap/11455
	* config/i386/winnt.c: Replace use of error(), warning() with
	error_with_decl(), warning_with_decl(),  throughout.


Index: winnt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/winnt.c,v
retrieving revision 1.50
diff -c -3 -p -r1.50 winnt.c
*** winnt.c	5 Jul 2003 15:39:59 -0000	1.50
--- winnt.c	7 Jul 2003 22:13:38 -0000
*************** ix86_handle_dll_attribute (pnode, name, 
*** 106,113 ****
        if (TREE_CODE (node) == FUNCTION_DECL  && DECL_INITIAL (node)
            && !DECL_INLINE (node))
  	{
! 	  error ("%Hfunction `%D' definition is marked dllimport.",
! 		 &DECL_SOURCE_LOCATION (node), node);
  	  *no_add_attrs = true;
  	}
  
--- 106,112 ----
        if (TREE_CODE (node) == FUNCTION_DECL  && DECL_INITIAL (node)
            && !DECL_INLINE (node))
  	{
! 	  error_with_decl (node, "function `%s' definition is marked dllimport.");
  	  *no_add_attrs = true;
  	}
  
*************** ix86_handle_dll_attribute (pnode, name, 
*** 115,122 ****
  	{
  	  if (DECL_INITIAL (node))
  	    {
! 	      error ("%Hvariable `%D' definition is marked dllimport.",
! 		     &DECL_SOURCE_LOCATION (node), node);
  	      *no_add_attrs = true;
  	    }
  
--- 114,120 ----
  	{
  	  if (DECL_INITIAL (node))
  	    {
! 	      error_with_decl (node,"variable `%s' definition is marked dllimport.");
  	      *no_add_attrs = true;
  	    }
  
*************** ix86_handle_dll_attribute (pnode, name, 
*** 135,142 ****
        && (TREE_CODE (node) == VAR_DECL
  	  || TREE_CODE (node) == FUNCTION_DECL)) 
      {
!       error ("%Hexternal linkage required for symbol '%D' because of '%s' attribute.",
! 	       &DECL_SOURCE_LOCATION (node), node, IDENTIFIER_POINTER (name));
        *no_add_attrs = true;
      }
  
--- 133,140 ----
        && (TREE_CODE (node) == VAR_DECL
  	  || TREE_CODE (node) == FUNCTION_DECL)) 
      {
!       error_with_decl (node, "external linkage required for symbol '%s' because of '%s'
attribute.",
! 		       IDENTIFIER_POINTER (name));
        *no_add_attrs = true;
      }
  
*************** i386_pe_dllimport_p (decl)
*** 254,261 ****
  	{
  	   /* Don't warn about artificial methods.  */
  	  if (!DECL_ARTIFICIAL (decl))
! 	    warning ("%H function '%D' is defined after prior declaration as dllimport: attribute
ignored",
! 		     &DECL_SOURCE_LOCATION (decl), decl);
  	  return 0;
  	}
  
--- 252,258 ----
  	{
  	   /* Don't warn about artificial methods.  */
  	  if (!DECL_ARTIFICIAL (decl))
! 	    warning_with_decl (decl,"function '%s' is defined after prior declaration as dllimport:
attribute ignored.");
  	  return 0;
  	}
  
*************** i386_pe_dllimport_p (decl)
*** 265,272 ****
        else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
          {
  	  if (extra_warnings)
! 	    warning ("%Hinline function '%D' is declared as dllimport: attribute ignored.", 
! 		     &DECL_SOURCE_LOCATION (decl), decl);
  	  return 0;
  	}
  
--- 262,268 ----
        else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
          {
  	  if (extra_warnings)
! 	    warning_with_decl (decl, "inline function '%s' is declared as dllimport: attribute
ignored.");
  	  return 0;
  	}
  
*************** i386_pe_dllimport_p (decl)
*** 277,293 ****
  	       && !DECL_EXTERNAL (decl) && context_imp)
  	{
  	  if (!DECL_VIRTUAL_P (decl))
! 	      error ("%Hdefinition of static data member '%D' of dllimport'd class.", 
! 		     &DECL_SOURCE_LOCATION (decl), decl);
             return 0;
  	}
  
!       /* Since we can't treat a pointer to a dllimport'd symbol as a
! 	 constant address, we turn off the attribute on C++ virtual
! 	 methods to allow creation of vtables using thunks. */
!       else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
! 	       && (DECL_VIRTUAL_P (decl)))
!            return 0;
  
        return 1;
      }
--- 273,288 ----
  	       && !DECL_EXTERNAL (decl) && context_imp)
  	{
  	  if (!DECL_VIRTUAL_P (decl))
! 	      error_with_decl (decl, "definition of static data member '%s' of dllimport'd class.");
             return 0;
  	}
  
!         /* Since we can't treat a pointer to a dllimport'd symbol as a
!   	   constant address, we turn off the attribute on C++ virtual
! 	   methods to allow creation of vtables using thunks.  */
! 	else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
! 	        && (DECL_VIRTUAL_P (decl)))
! 	  return 0;
  
        return 1;
      }
*************** i386_pe_mark_dllexport (decl)
*** 337,344 ****
      abort ();
    if (i386_pe_dllimport_name_p (oldname))
      {
!       warning ("%Hinconsistent dll linkage for '%D, dllexport assumed.",
! 	       &DECL_SOURCE_LOCATION (decl), decl);
       /* Remove DLL_IMPORT_PREFIX.  */
        oldname += strlen (DLL_IMPORT_PREFIX);
        DECL_NON_ADDR_CONST_P (decl) = 0;
--- 332,338 ----
      abort ();
    if (i386_pe_dllimport_name_p (oldname))
      {
!       warning_with_decl (decl,"inconsistent dll linkage for '%s': dllexport assumed.");
       /* Remove DLL_IMPORT_PREFIX.  */
        oldname += strlen (DLL_IMPORT_PREFIX);
        DECL_NON_ADDR_CONST_P (decl) = 0;
*************** i386_pe_mark_dllimport (decl)
*** 389,396 ****
        /* Already done, but do a sanity check to prevent assembler errors. */
        if (!DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
  	{
! 	  error ("%Hfailure in redeclaration of '%D': dllimport'd symbol lacks external linkage.", 
! 		 &DECL_SOURCE_LOCATION (decl), decl);
  	  abort();
  	}
        return;
--- 383,389 ----
        /* Already done, but do a sanity check to prevent assembler errors. */
        if (!DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
  	{
! 	  error_with_decl (decl, "failure in redeclaration of '%s': dllimport'd symbol lacks external
linkage.");
  	  abort();
  	}
        return;
*************** i386_pe_encode_section_info (decl, rtl, 
*** 536,546 ****
        tree idp = get_identifier (oldname + strlen (DLL_IMPORT_PREFIX));
        rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
  
!       warning ("%H%s '%D' %s after being referenced with dllimport linkage.",
! 	         &DECL_SOURCE_LOCATION (decl),
! 	         TREE_CODE (decl) == VAR_DECL ? "variable" : "function", 
! 	         decl, (DECL_INITIAL (decl) || !DECL_EXTERNAL (decl))
! 			? "defined locally" : "redeclared without dllimport attribute");
  
        XEXP (DECL_RTL (decl), 0) = newrtl;
  
--- 529,537 ----
        tree idp = get_identifier (oldname + strlen (DLL_IMPORT_PREFIX));
        rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
  
!       warning_with_decl (decl, "'%s' %s after being referenced with dllimport linkage.",
! 	         	 (DECL_INITIAL (decl) || !DECL_EXTERNAL (decl))
! 			 ? "defined locally" : "redeclared without dllimport attribute");
  
        XEXP (DECL_RTL (decl), 0) = newrtl;
  

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.


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