Is assigning to a union member from a different member in the same union defined by the C standard?

后端 未结 0 1027
悲&欢浪女
悲&欢浪女 2020-11-30 23:44

Consider:

union { int i; char c; } x = {0};
x.c = x.i;

C 2018 6.15.16.1 3, about simple assignment, says:

If the value be

相关标签:
回答
  • 消灭零回复
提交回复
热议问题