开发者

I have a following gcc compilation warning

  symbol.h:179: note: expected ‘uintptr_t *’ but argument is of type ‘PRECEDENCE’

The corresponding code is :

176 void            symbol_SetCount(SYMBOL, unsigned long);
177 unsigned long   symbol_GetCount(SYMBOL);
178 
179 size_t             symbol_Ordering(uintptr_t*, SYMBOL);
180 
181 void            symbol_CheckIndexInRange(int);
182 void            symbol_CheckNoVariable(SYMBOL);

SYMBOL is defined as:

typedef size_t SYMBOL

Any effort will be highly appreciated.

PRECEDENCE has been modified as:

typedef int *PRECEDENCE;


int        symbol_Ordering(PRECEDENCE, SYMBOL);

here is some additional information of symbol_Ordering:

 if (symbol_Equal(propSymbol, eml_Id())) 
{  /* Arguments should be nil, propositional */
symbol_SetOrdering(Precedence, fol_Equality(), symbol_Ordering(Precedence, eml_Id()));
return eml_RplacWithOpAndArgs(Atom, fol_Equality(), Args)}

int  symbol_ORDERING;


int symbol_GetIncreasedOrderingCounter(void)

{ return symbol_ORDERING++; }

 static __inline__ BOOL symbol_PrecedenceGreater(PRECEDENCE P, SYMBOL S1, SYMBOL S2)
{
return symbol_Ordering开发者_Go百科((uintptr_t*)P, S1) < symbol_Ordering((uintptr_t*)P, S2);
 }

 size_t             symbol_Ordering(uintptr_t*, SYMBOL);


It looks like you have multiple declarations of symbol_Ordering - one that takes a uintptr_t* and one that takes an int*. uintptr_t* and int* aren't the same type (one is signed, one is unsigned), so don't do that. Make the types match.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜