Commit 456d8864 by Gabriel Dos Reis Committed by Gabriel Dos Reis

decl.c (duplicate_decls): Convert use of warning_with_decl() to that of warning().

        * decl.c (duplicate_decls): Convert use of warning_with_decl() to
        that of warning().
        (start_decl): Likewise.
        (start_function): Likewise.

From-SVN: r63625
parent d0efead7
2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
* decl.c (duplicate_decls): Convert use of warning_with_decl() to
that of warning().
(start_decl): Likewise.
(start_function): Likewise.
2003-03-01 Neil Booth <neil@daikokuya.co.uk> 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
* Make-lang.in (CXX_C_OBJS): Update. * Make-lang.in (CXX_C_OBJS): Update.
......
...@@ -2981,19 +2981,19 @@ duplicate_decls (tree newdecl, tree olddecl) ...@@ -2981,19 +2981,19 @@ duplicate_decls (tree newdecl, tree olddecl)
&& DECL_UNINLINABLE (olddecl) && DECL_UNINLINABLE (olddecl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl))) && lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl)))
{ {
warning_with_decl (newdecl, warning ("%Hfunction '%D' redeclared as inline",
"function `%s' redeclared as inline"); &DECL_SOURCE_LOCATION (newdecl), newdecl);
warning_with_decl (olddecl, warning ("%Hprevious declaration of '%D' with attribute noinline",
"previous declaration of function `%s' with attribute noinline"); &DECL_SOURCE_LOCATION (olddecl), olddecl);
} }
else if (DECL_DECLARED_INLINE_P (olddecl) else if (DECL_DECLARED_INLINE_P (olddecl)
&& DECL_UNINLINABLE (newdecl) && DECL_UNINLINABLE (newdecl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl))) && lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl)))
{ {
warning_with_decl (newdecl, warning ("%Hfunction '%D' redeclared with attribute noinline",
"function `%s' redeclared with attribute noinline"); &DECL_SOURCE_LOCATION (newdecl), newdecl);
warning_with_decl (olddecl, warning ("%Hprevious declaration of '%D' was inline",
"previous declaration of function `%s' was inline"); &DECL_SOURCE_LOCATION (olddecl), olddecl);
} }
} }
...@@ -7090,8 +7090,8 @@ start_decl (tree declarator, ...@@ -7090,8 +7090,8 @@ start_decl (tree declarator,
&& DECL_DECLARED_INLINE_P (decl) && DECL_DECLARED_INLINE_P (decl)
&& DECL_UNINLINABLE (decl) && DECL_UNINLINABLE (decl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (decl))) && lookup_attribute ("noinline", DECL_ATTRIBUTES (decl)))
warning_with_decl (decl, warning ("%Hinline function '%D' given attribute noinline",
"inline function `%s' given attribute noinline"); &DECL_SOURCE_LOCATION (decl), decl);
if (context && COMPLETE_TYPE_P (complete_type (context))) if (context && COMPLETE_TYPE_P (complete_type (context)))
{ {
...@@ -13434,8 +13434,8 @@ start_function (tree declspecs, tree declarator, tree attrs, int flags) ...@@ -13434,8 +13434,8 @@ start_function (tree declspecs, tree declarator, tree attrs, int flags)
if (DECL_DECLARED_INLINE_P (decl1) if (DECL_DECLARED_INLINE_P (decl1)
&& lookup_attribute ("noinline", attrs)) && lookup_attribute ("noinline", attrs))
warning_with_decl (decl1, warning ("%Hinline function '%D' given attribute noinline",
"inline function `%s' given attribute noinline"); &DECL_SOURCE_LOCATION (decl1), decl1);
if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl1)) if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl1))
/* This is a constructor, we must ensure that any default args /* This is a constructor, we must ensure that any default args
......
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