Ah, cool, didn't know about _Alignas. I'm a codegen guy so I'm not playing around in the C frontend very often. I only look at the standard when I really have to. :)
There's still an ABI problem if the compiler always has to align members to uphold the requirement.
> Perfectly working C++ program can already be broken by recompilation in
> C++11 mode
But as we all know, C++ is not C. :) I don't see this as a problem.
Posted Feb 7, 2012 20:53 UTC (Tue) by khim (subscriber, #9252)
[Link]
> Perfectly working C++ program can already be broken by recompilation in
> C++11 mode
But as we all know, C++ is not C. :) I don't see this as a problem.
C++ is quite explicitly not C, but C++11 pretends that it's still C++.
Betrayed by a bitfield
Posted Feb 7, 2012 23:29 UTC (Tue) by daglwn (subscriber, #65432)
[Link]
Ah, I read "C11."
Yes, you are correct, but I don't think there's an ABI issue. An ABI issue is much harder to deal with than a semantic change.
With an ABI issue you've got to recompile the world (your project, libraries it links to, etc.) to get a working application. With a semantic change you only recompile the bits that had to recoded to account for the change.
Betrayed by a bitfield
Posted Feb 8, 2012 8:54 UTC (Wed) by khim (subscriber, #9252)
[Link]
YMMV, as usual.
We recompile the world anyway, so ABI change is less of a problem, but the fact that just a recompilation does not fix the issue and you need to do a lot of investigations is a problem.