having functions of type Union

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

having functions of type Union

Jump to solution
1,011 Views
markgreggory
Contributor II

Hello,

 

With IAR I was able to typedef a variable as a union then create a function of that type variable so the return on the function would be used with the features I had in the union. CW10 is not liking this. I'm getting a "declaration syntax error". I can not find any documentation that states a function can NOT be of type Union in C and why has IAR allowed this as valid syntax and executes correctly?

 

Regards,

Mark

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
907 Views
markgreggory
Contributor II

Found the problem. I had to remove: #include <stdio.h> 

View solution in original post

0 Kudos
Reply
1 Reply
908 Views
markgreggory
Contributor II

Found the problem. I had to remove: #include <stdio.h> 

0 Kudos
Reply