FreeBSD/contrib/gcc/cp/decl.c
/* DECL is a VAR_DECL defined in-class, whose TYPE is also given.
   Check to see that the definition is valid.  Issue appropriate error
   messages.  Return 1 if the definition is particularly bad, or 0
   otherwise.  */
DECL is a VAR_DECL defined in-class, whose TYPE is also given.
Check to see that the definition is valid.  Issue appropriate error
messages.  Return 1 if the definition is particularly bad, or 0
otherwise.
DECL is a VAR_DECL defined in - class whose TYPE is also given . Check to see that the definition is valid . Issue appropriate error messages . Return 1 if the definition is particularly bad or 0 otherwise .
int
check_static_variable_definition (tree decl, tree type)
{
  if (!ARITHMETIC_TYPE_P (type) && TREE_CODE (type) != ENUMERAL_TYPE)
    {
      error ("invalid in-class initialization of static data member "
	     "of non-integral type %qT",
	     type);
      return 1;
    }
  else if (!CP_TYPE_CONST_P (type))
    error ("ISO C++ forbids in-class initialization of non-const "
	   "static member %qD",
	   decl);
  else if (pedantic && !INTEGRAL_TYPE_P (type))
    pedwarn ("ISO C++ forbids initialization of member constant "
	     "%qD of non-integral type %qT", decl, type);
  return 0;
}
int check_static_variable_definition ( tree decl , tree type ) { if ( ! ARITHMETIC_TYPE_P ( type ) && TREE_CODE ( type ) != ENUMERAL_TYPE ) { error ( " " " " , type ) ; return 1 ; } else if ( ! CP_TYPE_CONST_P ( type ) ) error ( " " " " , decl ) ; else if ( pedantic && ! INTEGRAL_TYPE_P ( type ) ) pedwarn ( " " " " , decl , type ) ; return 0 ; }
DECL is a VAR_DECL defined in-class, whose TYPE is also given.
DECL is a VAR_DECL defined in - class whose TYPE is also given .
/* Motion 10 at San Diego: If a static const integral data member is
     initialized with an integral constant expression, the initializer
     may appear either in the declaration (within the class), or in
     the definition, but not both.  If it appears in the class, the
     member is a member constant.  The file-scope definition is always
     required.  */ /* If we just return the declaration, crashes will sometimes
	 occur.  We therefore return void_type_node, as if this were a
	 friend declaration, to cause callers to completely ignore
	 this declaration.  */