FreeBSD/contrib/gcc/cp/typeck.c
/* Do `exp = require_complete_type (exp);' to make sure exp
   does not have an incomplete type.  (That includes void types.)
   Returns the error_mark_node if the VALUE does not have
   complete type when this function returns.  */
Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type.  (That includes void types.)
Returns the error_mark_node if the VALUE does not have
complete type when this function returns.
Do ` exp = require_complete_type ( exp ) ; ' to make sure exp does not have an incomplete type . ( That includes void types . ) Returns the error_mark_node if the VALUE does not have complete type when this function returns .
tree
require_complete_type (tree value)
{
  tree type;
  if (processing_template_decl || value == error_mark_node)
    return value;
  if (TREE_CODE (value) == OVERLOAD)
    type = unknown_type_node;
  else
    type = TREE_TYPE (value);
  if (type == error_mark_node)
    return error_mark_node;
  if (COMPLETE_TYPE_P (type))
    return value;
  if (complete_type_or_else (type, value))
    return value;
  else
    return error_mark_node;
}
tree require_complete_type ( tree value ) { tree type ; if ( processing_template_decl || value == error_mark_node ) return value ; if ( TREE_CODE ( value ) == OVERLOAD ) type = unknown_type_node ; else type = TREE_TYPE ( value ) ; if ( type == error_mark_node ) return error_mark_node ; if ( COMPLETE_TYPE_P ( type ) ) return value ; if ( complete_type_or_else ( type , value ) ) return value ; else return error_mark_node ; }
Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type.
Do ` exp = require_complete_type ( exp ) ; ' to make sure exp does not have an incomplete type .
/* First, detect a valid value with a complete type.  */