FreeBSD/contrib/gcc/cp/cvt.c
/* Subroutine of convert_to_reference. REFTYPE is the target reference type.
   INTYPE is the original rvalue type and DECL is an optional _DECL node
   for diagnostics.

   [dcl.init.ref] says that if an rvalue is used to
   initialize a reference, then the reference must be to a
   non-volatile const type.  */


[dcl.init.ref] says that if an rvalue is used to
initialize a reference, then the reference must be to a
non-volatile const type.
[ dcl . init . ref ] says that if an rvalue is used to initialize a reference then the reference must be to a non - volatile const type .
static void
warn_ref_binding (tree reftype, tree intype, tree decl)
{
  tree ttl = TREE_TYPE (reftype);
  if (!CP_TYPE_CONST_NON_VOLATILE_P (ttl))
    {
      const char *msg;
      if (CP_TYPE_VOLATILE_P (ttl) && decl)
	  msg = "initialization of volatile reference type %q#T from"
	    " rvalue of type %qT";
      else if (CP_TYPE_VOLATILE_P (ttl))
	  msg = "conversion to volatile reference type %q#T "
	    " from rvalue of type %qT";
      else if (decl)
	  msg = "initialization of non-const reference type %q#T from"
	    " rvalue of type %qT";
      else
	  msg = "conversion to non-const reference type %q#T from"
	    " rvalue of type %qT";
      pedwarn (msg, reftype, intype);
    }
}
static void warn_ref_binding ( tree reftype , tree intype , tree decl ) { tree ttl = TREE_TYPE ( reftype ) ; if ( ! CP_TYPE_CONST_NON_VOLATILE_P ( ttl ) ) { const char * msg ; if ( CP_TYPE_VOLATILE_P ( ttl ) && decl ) msg = " " " " ; else if ( CP_TYPE_VOLATILE_P ( ttl ) ) msg = " " " " ; else if ( decl ) msg = " " " " ; else msg = " " " " ; pedwarn ( msg , reftype , intype ) ; } }
Subroutine of convert_to_reference.
Subroutine of convert_to_reference .