This is one of the most important reasons for me to use C/C++ in writing some classes of system software, but it's been nothing more than a compiler extension which happens to be very common. Why isn't the committee considering to support it officially? Was it incompatible with any clauses in the existing spec, such as Does public and private have any influence on the memory layout of an object?
What prevents __attribute__((packed)) from getting into ISO C/C++?
Asked Answered
Why isn't the committee considering to support it officially?
Because nobody proposed it. The closest thing to such a proposal was N3986 (PDF), which only works for bitfields. The comments from the discussion suggest that the committee would be interested, but they want to understand what existing practice does before trying to move forward on standardizing it.
Since then, whomever was responsible for that proposal decided not to continue to pursue it.
© 2022 - 2024 — McMap. All rights reserved.
struct
s from the C standard? This is about adding implementation-specific stuff to a general standard successfully aimed at a plethora of very different platforms. There is more to C than x86 or ARM! – Cohbath