FreeBSD/contrib/gcc/cp/class.c
/* If this declaration supersedes the declaration of
   a method declared virtual in the base class, then
   mark this field as being virtual as well.  */
If this declaration supersedes the declaration of
a method declared virtual in the base class, then
mark this field as being virtual as well.
If this declaration supersedes the declaration of a method declared virtual in the base class then mark this field as being virtual as well .
void
check_for_override (tree decl, tree ctype)
{
  if (TREE_CODE (decl) == TEMPLATE_DECL)
    return;
  if ((DECL_DESTRUCTOR_P (decl)
       || IDENTIFIER_VIRTUAL_P (DECL_NAME (decl))
       || DECL_CONV_FN_P (decl))
      && look_for_overrides (ctype, decl)
      && !DECL_STATIC_FUNCTION_P (decl))
    DECL_VINDEX (decl) = decl;
  if (DECL_VIRTUAL_P (decl))
    {
      if (!DECL_VINDEX (decl))
	DECL_VINDEX (decl) = error_mark_node;
      IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)) = 1;
      if (DECL_DLLIMPORT_P (decl))
	{
	  DECL_DLLIMPORT_P (decl) = 0;
	  DECL_ATTRIBUTES (decl)
	    = remove_attribute ("dllimport", DECL_ATTRIBUTES (decl));
	}
    }
}
void check_for_override ( tree decl , tree ctype ) { if ( TREE_CODE ( decl ) == TEMPLATE_DECL ) return ; if ( ( DECL_DESTRUCTOR_P ( decl ) || IDENTIFIER_VIRTUAL_P ( DECL_NAME ( decl ) ) || DECL_CONV_FN_P ( decl ) ) && look_for_overrides ( ctype , decl ) && ! DECL_STATIC_FUNCTION_P ( decl ) ) DECL_VINDEX ( decl ) = decl ; if ( DECL_VIRTUAL_P ( decl ) ) { if ( ! DECL_VINDEX ( decl ) ) DECL_VINDEX ( decl ) = error_mark_node ; IDENTIFIER_VIRTUAL_P ( DECL_NAME ( decl ) ) = 1 ; if ( DECL_DLLIMPORT_P ( decl ) ) { DECL_DLLIMPORT_P ( decl ) = 0 ; DECL_ATTRIBUTES ( decl ) = remove_attribute ( " " , DECL_ATTRIBUTES ( decl ) ) ; } } }
If this declaration supersedes the declaration of
a method declared virtual in the base class, then
mark this field as being virtual as well.
If this declaration supersedes the declaration of a method declared virtual in the base class then mark this field as being virtual as well .
/* In [temp.mem] we have:

	 A specialization of a member function template does not
	 override a virtual function from a base class.  */ /* Set DECL_VINDEX to a value that is neither an INTEGER_CST nor
       the error_mark_node so that we know it is an overriding
       function.  */ /* When we handled the dllimport attribute we may not have known
	     that this function is virtual   We can't use dllimport
	     semantics for a virtual method because we need to initialize
	     the vtable entry with a constant address.  */