re PR bootstrap/11455 (Bootstrap failure in Cygwin)

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

From-SVN: r69107
This commit is contained in:
Danny Smith 2003-07-08 23:40:36 +00:00 committed by Danny Smith
parent 2178981638
commit 81a6341d7e
2 changed files with 20 additions and 23 deletions

View File

@ -1,3 +1,9 @@
2003-07-08 Danny Smith <dannysmith@users.sourceforge.net>
PR bootstrap/11455
* config/i386/winnt.c: Replace use of error(), warning() with
error_with_decl(), warning_with_decl(), throughout.
2003-07-08 Neil Booth <neil@daikokuya.co.uk>
* opts.c (wrap_help): Use unsigned int, not size_t.

View File

@ -106,8 +106,7 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
if (TREE_CODE (node) == FUNCTION_DECL && DECL_INITIAL (node)
&& !DECL_INLINE (node))
{
error ("%Hfunction `%D' definition is marked dllimport.",
&DECL_SOURCE_LOCATION (node), node);
error_with_decl (node, "function `%s' definition is marked dllimport.");
*no_add_attrs = true;
}
@ -115,8 +114,7 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
{
if (DECL_INITIAL (node))
{
error ("%Hvariable `%D' definition is marked dllimport.",
&DECL_SOURCE_LOCATION (node), node);
error_with_decl (node,"variable `%s' definition is marked dllimport.");
*no_add_attrs = true;
}
@ -135,8 +133,8 @@ ix86_handle_dll_attribute (pnode, name, args, flags, no_add_attrs)
&& (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));
error_with_decl (node, "external linkage required for symbol '%s' because of '%s' attribute.",
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
@ -254,8 +252,7 @@ i386_pe_dllimport_p (decl)
{
/* 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);
warning_with_decl (decl,"function '%s' is defined after prior declaration as dllimport: attribute ignored.");
return 0;
}
@ -265,8 +262,7 @@ i386_pe_dllimport_p (decl)
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);
warning_with_decl (decl, "inline function '%s' is declared as dllimport: attribute ignored.");
return 0;
}
@ -277,17 +273,16 @@ i386_pe_dllimport_p (decl)
&& !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);
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. */
methods to allow creation of vtables using thunks. */
else if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
&& (DECL_VIRTUAL_P (decl)))
return 0;
return 0;
return 1;
}
@ -337,8 +332,7 @@ i386_pe_mark_dllexport (decl)
abort ();
if (i386_pe_dllimport_name_p (oldname))
{
warning ("%Hinconsistent dll linkage for '%D, dllexport assumed.",
&DECL_SOURCE_LOCATION (decl), decl);
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;
@ -389,8 +383,7 @@ i386_pe_mark_dllimport (decl)
/* 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);
error_with_decl (decl, "failure in redeclaration of '%s': dllimport'd symbol lacks external linkage.");
abort();
}
return;
@ -536,11 +529,9 @@ i386_pe_encode_section_info (decl, rtl, first)
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");
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;