FreeBSD/contrib/gcc/cp/decl.c
/* DECL was originally constructed as a non-static member function,
   but turned out to be static.  Update it accordingly.  */
DECL was originally constructed as a non-static member function,
but turned out to be static.  Update it accordingly.
DECL was originally constructed as a non - static member function but turned out to be static . Update it accordingly .
void
revert_static_member_fn (tree decl)
{
  tree tmp;
  tree function = TREE_TYPE (decl);
  tree args = TYPE_ARG_TYPES (function);
  if (cp_type_quals (TREE_TYPE (TREE_VALUE (args)))
      != TYPE_UNQUALIFIED)
    error ("static member function %q#D declared with type qualifiers", decl);
  args = TREE_CHAIN (args);
  tmp = build_function_type (TREE_TYPE (function), args);
  tmp = build_qualified_type (tmp, cp_type_quals (function));
  tmp = build_exception_variant (tmp,
				 TYPE_RAISES_EXCEPTIONS (function));
  TREE_TYPE (decl) = tmp;
  if (DECL_ARGUMENTS (decl))
    DECL_ARGUMENTS (decl) = TREE_CHAIN (DECL_ARGUMENTS (decl));
  DECL_STATIC_FUNCTION_P (decl) = 1;
}
void revert_static_member_fn ( tree decl ) { tree tmp ; tree function = TREE_TYPE ( decl ) ; tree args = TYPE_ARG_TYPES ( function ) ; if ( cp_type_quals ( TREE_TYPE ( TREE_VALUE ( args ) ) ) != TYPE_UNQUALIFIED ) error ( " " , decl ) ; args = TREE_CHAIN ( args ) ; tmp = build_function_type ( TREE_TYPE ( function ) , args ) ; tmp = build_qualified_type ( tmp , cp_type_quals ( function ) ) ; tmp = build_exception_variant ( tmp , TYPE_RAISES_EXCEPTIONS ( function ) ) ; TREE_TYPE ( decl ) = tmp ; if ( DECL_ARGUMENTS ( decl ) ) DECL_ARGUMENTS ( decl ) = TREE_CHAIN ( DECL_ARGUMENTS ( decl ) ) ; DECL_STATIC_FUNCTION_P ( decl ) = 1 ; }
DECL was originally constructed as a non-static member function,
but turned out to be static.
DECL was originally constructed as a non - static member function but turned out to be static .