having functions of type Union

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

having functions of type Union

跳至解决方案
1,422 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,318 次查看
markgreggory
Contributor II

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

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,319 次查看
markgreggory
Contributor II

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

0 项奖励
回复