FreeBSD/contrib/gcc/cp/decl.c
/* DECL is a member function or static data member and is presently
   being defined.  Check that the definition is taking place in a
   valid namespace.  */
DECL is a member function or static data member and is presently
being defined.  Check that the definition is taking place in a
valid namespace.
DECL is a member function or static data member and is presently being defined . Check that the definition is taking place in a valid namespace .
static void
check_class_member_definition_namespace (tree decl)
{
  gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
	      || TREE_CODE (decl) == VAR_DECL);
  if (processing_specialization)
    return;
  if (processing_explicit_instantiation)
    return;
  if (!is_ancestor (current_namespace, DECL_CONTEXT (decl)))
    pedwarn ("definition of %qD is not in namespace enclosing %qT",
	     decl, DECL_CONTEXT (decl));
}
static void check_class_member_definition_namespace ( tree decl ) { gcc_assert ( TREE_CODE ( decl ) == FUNCTION_DECL || TREE_CODE ( decl ) == VAR_DECL ) ; if ( processing_specialization ) return ; if ( processing_explicit_instantiation ) return ; if ( ! is_ancestor ( current_namespace , DECL_CONTEXT ( decl ) ) ) pedwarn ( " " , decl , DECL_CONTEXT ( decl ) ) ; }
DECL is a member function or static data member and is presently
being defined.
DECL is a member function or static data member and is presently being defined .
/* These checks only apply to member functions and static data
     members.  */ /* We check for problems with specializations in pt.c in
     check_specialization_namespace, where we can issue better
     diagnostics.  */ /* There are no restrictions on the placement of
     explicit instantiations.  */ /* [class.mfct]

     A member function definition that appears outside of the
     class definition shall appear in a namespace scope enclosing
     the class definition.

     [class.static.data]

     The definition for a static data member shall appear in a
     namespace scope enclosing the member's class definition.  */