FreeBSD/contrib/gcc/c-common.c
/* A helper function for resolve_overloaded_builtin in resolving the
   overloaded __sync_ builtins.  Returns a positive power of 2 if the
   first operand of PARAMS is a pointer to a supported data type.
   Returns 0 if an error is encountered.  */
A helper function for resolve_overloaded_builtin in resolving the
overloaded __sync_ builtins.  Returns a positive power of 2 if the
first operand of PARAMS is a pointer to a supported data type.
Returns 0 if an error is encountered.
A helper function for resolve_overloaded_builtin in resolving the overloaded __sync_ builtins . Returns a positive power of 2 if the first operand of PARAMS is a pointer to a supported data type . Returns 0 if an error is encountered .
static int
sync_resolve_size (tree function, tree params)
{
  tree type;
  int size;
  if (params == NULL)
    {
      error ("too few arguments to function %qE", function);
      return 0;
    }
  type = TREE_TYPE (TREE_VALUE (params));
  if (TREE_CODE (type) != POINTER_TYPE)
    goto incompatible;
  type = TREE_TYPE (type);
  if (!INTEGRAL_TYPE_P (type) && !POINTER_TYPE_P (type))
    goto incompatible;
  size = tree_low_cst (TYPE_SIZE_UNIT (type), 1);
  if (size == 1 || size == 2 || size == 4 || size == 8 || size == 16)
    return size;
 incompatible:
  error ("incompatible type for argument %d of %qE", 1, function);
  return 0;
}
static int sync_resolve_size ( tree function , tree params ) { tree type ; int size ; if ( params == NULL ) { error ( " " , function ) ; return 0 ; } type = TREE_TYPE ( TREE_VALUE ( params ) ) ; if ( TREE_CODE ( type ) != POINTER_TYPE ) goto incompatible ; type = TREE_TYPE ( type ) ; if ( ! INTEGRAL_TYPE_P ( type ) && ! POINTER_TYPE_P ( type ) ) goto incompatible ; size = tree_low_cst ( TYPE_SIZE_UNIT ( type ) , 1 ) ; if ( size == 1 || size == 2 || size == 4 || size == 8 || size == 16 ) return size ; incompatible : error ( " " , 1 , function ) ; return 0 ; }
A helper function for resolve_overloaded_builtin in resolving the
overloaded __sync_ builtins.
A helper function for resolve_overloaded_builtin in resolving the overloaded __sync_ builtins .