Implicit Conversions error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implicit Conversions error

957 Views
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?
 
 
 
 
 
 
 
 
 
Labels (1)
0 Kudos
1 Reply

286 Views
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 Kudos