FreeBSD/contrib/gcc/cp/decl.c
/* If NEWDECL is `static' and an `extern' was seen previously,
   warn about it.  OLDDECL is the previous declaration.

   Note that this does not apply to the C++ case of declaring
   a variable `extern const' and then later `const'.

   Don't complain about built-in functions, since they are beyond
   the user's control.  */
If NEWDECL is `static' and an `extern' was seen previously,
warn about it.  OLDDECL is the previous declaration.

Note that this does not apply to the C++ case of declaring
a variable `extern const' and then later `const'.

Don't complain about built-in functions, since they are beyond
the user's control.
If NEWDECL is ` static ' and an ` extern ' was seen previously warn about it . OLDDECL is the previous declaration . Note that this does not apply to the C ++ case of declaring a variable ` extern const ' and then later ` const ' . Don ' t complain about built - in functions since they are beyond the user ' s control .
void
warn_extern_redeclared_static (tree newdecl, tree olddecl)
{
  tree name;
  if (TREE_CODE (newdecl) == TYPE_DECL
      || TREE_CODE (newdecl) == TEMPLATE_DECL
      || TREE_CODE (newdecl) == CONST_DECL
      || TREE_CODE (newdecl) == NAMESPACE_DECL)
    return;
  if (TREE_CODE (newdecl) == FUNCTION_DECL
      && DECL_STATIC_FUNCTION_P (newdecl))
    return;
  if (DECL_THIS_STATIC (olddecl) || !DECL_THIS_STATIC (newdecl))
    return;
  if (TREE_CODE (olddecl) == FUNCTION_DECL
      && DECL_ARTIFICIAL (olddecl))
    return;
  name = DECL_ASSEMBLER_NAME (newdecl);
  pedwarn ("%qD was declared %<extern%> and later %<static%>", newdecl);
  pedwarn ("previous declaration of %q+D", olddecl);
}
void warn_extern_redeclared_static ( tree newdecl , tree olddecl ) { tree name ; if ( TREE_CODE ( newdecl ) == TYPE_DECL || TREE_CODE ( newdecl ) == TEMPLATE_DECL || TREE_CODE ( newdecl ) == CONST_DECL || TREE_CODE ( newdecl ) == NAMESPACE_DECL ) return ; if ( TREE_CODE ( newdecl ) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P ( newdecl ) ) return ; if ( DECL_THIS_STATIC ( olddecl ) || ! DECL_THIS_STATIC ( newdecl ) ) return ; if ( TREE_CODE ( olddecl ) == FUNCTION_DECL && DECL_ARTIFICIAL ( olddecl ) ) return ; name = DECL_ASSEMBLER_NAME ( newdecl ) ; pedwarn ( " " , newdecl ) ; pedwarn ( " " , olddecl ) ; }
If NEWDECL is `static' and an `extern' was seen previously,
warn about it.
If NEWDECL is ` static ' and an ` extern ' was seen previously warn about it .
/* Don't get confused by static member functions; that's a different
     use of `static'.  */ /* If the old declaration was `static', or the new one isn't, then
     then everything is OK.  */ /* It's OK to declare a builtin function as `static'.  */