FreeBSD/contrib/gcc/c-parser.c
/* Return true if TOKEN can start a type name,
   false otherwise.  */
Return true if TOKEN can start a type name,
false otherwise.
Return true if TOKEN can start a type name false otherwise .
static bool
c_token_starts_typename (c_token *token)
{
  switch (token->type)
    {
    case CPP_NAME:
      switch (token->id_kind)
	{
	case C_ID_ID:
	  return false;
	case C_ID_TYPENAME:
	  return true;
	case C_ID_CLASSNAME:
	  gcc_assert (c_dialect_objc ());
	  return true;
	default:
	  gcc_unreachable ();
	}
    case CPP_KEYWORD:
      switch (token->keyword)
	{
	case RID_UNSIGNED:
	case RID_LONG:
	case RID_SHORT:
	case RID_SIGNED:
	case RID_COMPLEX:
	case RID_INT:
	case RID_CHAR:
	case RID_FLOAT:
	case RID_DOUBLE:
	case RID_VOID:
	case RID_DFLOAT32:
	case RID_DFLOAT64:
	case RID_DFLOAT128:
	case RID_BOOL:
	case RID_ENUM:
	case RID_STRUCT:
	case RID_UNION:
	case RID_TYPEOF:
	case RID_CONST:
	case RID_VOLATILE:
	case RID_RESTRICT:
	case RID_ATTRIBUTE:
	  return true;
	default:
	  return false;
	}
    case CPP_LESS:
      if (c_dialect_objc ())
	return true;
      return false;
    default:
      return false;
    }
}
static bool c_token_starts_typename ( c_token * token ) { switch ( token -> type ) { case CPP_NAME : switch ( token -> id_kind ) { case C_ID_ID : return false ; case C_ID_TYPENAME : return true ; case C_ID_CLASSNAME : gcc_assert ( c_dialect_objc ( ) ) ; return true ; default : gcc_unreachable ( ) ; } case CPP_KEYWORD : switch ( token -> keyword ) { case RID_UNSIGNED : case RID_LONG : case RID_SHORT : case RID_SIGNED : case RID_COMPLEX : case RID_INT : case RID_CHAR : case RID_FLOAT : case RID_DOUBLE : case RID_VOID : case RID_DFLOAT32 : case RID_DFLOAT64 : case RID_DFLOAT128 : case RID_BOOL : case RID_ENUM : case RID_STRUCT : case RID_UNION : case RID_TYPEOF : case RID_CONST : case RID_VOLATILE : case RID_RESTRICT : case RID_ATTRIBUTE : return true ; default : return false ; } case CPP_LESS : if ( c_dialect_objc ( ) ) return true ; return false ; default : return false ; } }
Return true if TOKEN can start a type name,
false otherwise.
Return true if TOKEN can start a type name false otherwise .