Implicit Conversions error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Implicit Conversions error

1,394件の閲覧回数
Ming
Contributor III
we are having an issue which stopped us from compiling our code. The issue involves a pointer to an union and pass it as an argument into a function. here is a simple example:
 
union A{
  uint 8 one;
  uint8 two;
}
 
union A a; // a is an instance of A
 
void funcB(union A *ptr)
{
}
 
void main(void)
{
 funcB(&a);
}
 
we got an "implicit conversion" error. we are trying to port in our existing code, which works ok on S12 and S16 processor, but not so for coldfire. any ideals?
 
 
 
 
 
 
 
 
 
ラベル(1)
0 件の賞賛
返信
1 返信

723件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee
Hmm. Can you copy paste the error message here? Just click in the error message window and press Ctrl-C.

And please also try to compile your sample and also show the errors it generates.
Currently your snippet misses to define uint8, has a space in "uint 8 one" and there is a also a semicolon missing after the union definition. So check if the fixed sample does trigger the compiler error, or maybe the compiler complains about something else.

Daniel
0 件の賞賛
返信