void ClassErr( int errcod, sym_id sym ) { //========================================== char class[MAX_MSGLEN+1]; Error( errcod, GetClass( SymClass( sym ), class ) ); }
static bool dirFuncSetLinkage( directive_t *dir, dir_table_enum parm ) //******************************************************************** { sym_handle sym; if( !dirNumOperandsVerify( dir->num_operands, 1 ) ) { return( TRUE ); } sym = SYMBOL_HANDLE( dir->operand_list ); assert( sym != NULL ); assert( SymClass( sym ) == SYM_LABEL ); switch( parm ) { case DT_LNK_GLOBAL: if( SymGetLinkage( sym ) == SL_STATIC ) { // Too bad the label is already emitted as static :( Warning( GLOBL_DECL_OUT_OF_ORDER ); } else { SymSetLinkage( sym, SL_GLOBAL ); } break; default: assert( FALSE ); } return( TRUE ); }
void PrevDef( sym_id sym ) { //============================= char buff[MAX_SYMLEN+1]; char class[MAX_MSGLEN+1]; STGetName( sym, buff ); Error( VA_PREV_DEF_NAM, buff, GetClass( SymClass( sym ), class ) ); }
void ClassNameErr( int errcod, sym_id sym ) { //============================================== char buff[MAX_SYMLEN+1]; char class[MAX_MSGLEN+1]; STGetName( sym, buff ); Error( errcod, GetClass( SymClass( sym ), class ), buff ); }
void IllName( sym_id sym ) { //============================= char buff[MAX_SYMLEN+1]; char class[MAX_MSGLEN+1]; char stmt[MAX_MSGLEN+1]; STGetName( sym, buff ); Error( VA_ILL_USE, GetClass( SymClass( sym ), class ), buff, StmtName( stmt ) ); }
TYPE TypeThisForCall( // GET "THIS" TYPE FOR A CALL PTREE this_node, // - this node SYMBOL sym ) // - function being called { TYPE this_type; // - target type for "this" this_type = SymClass( sym ); if( ExprIsLvalue( this_node ) ) { this_type = MakeReferenceTo( this_type ); } else { this_type = MakePointerTo( this_type ); } return( this_type ); }