是什么阻止 __attribute__((packed)) 进入 ISO C/C++?
What prevents __attribute__((packed)) from getting into ISO C/C++?
这是我使用 C/C++ 编写一些 类 系统软件的最重要原因之一,但它只不过是一个编译器扩展,恰好非常常见的。
为什么委员会不考虑正式支持它?它是否与现有规范中的任何条款不兼容,例如
Why isn't the committee considering to support it officially?
因为没有人提出。最接近此类提案的是 N3986 (PDF), which only works for bitfields. The comments from the discussion 建议委员会感兴趣,但他们想在尝试推进标准化之前了解现有实践的作用。
从那时起,负责该提案的人决定不再继续进行。
这是我使用 C/C++ 编写一些 类 系统软件的最重要原因之一,但它只不过是一个编译器扩展,恰好非常常见的。
为什么委员会不考虑正式支持它?它是否与现有规范中的任何条款不兼容,例如
Why isn't the committee considering to support it officially?
因为没有人提出。最接近此类提案的是 N3986 (PDF), which only works for bitfields. The comments from the discussion 建议委员会感兴趣,但他们想在尝试推进标准化之前了解现有实践的作用。
从那时起,负责该提案的人决定不再继续进行。