Betrayed by a bitfield
Betrayed by a bitfield
Posted Feb 7, 2012 8:43 UTC (Tue) by khim (subscriber, #9252)In reply to: Betrayed by a bitfield by daglwn
Parent article: Betrayed by a bitfield
Since C11 includes _Alignas and you can specify you own alignment it's not a disaster, albeit it is inconvenience.
Perfectly working C++ program can already be broken by recompilation in C++11 mode, so it's not the first time upgrade broke things.
Of course is only possible if original program violated specs and worked by accident (if you can show me genuinely different behavior in standards-compliant program it'll be interesting to know, too, but so far all examples I've seen contained subtle violations of one form or another).
Posted Feb 7, 2012 18:35 UTC (Tue)
by daglwn (guest, #65432)
[Link] (3 responses)
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
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] (2 responses)
C++ is quite explicitly not C, but C++11 pretends that it's still C++.
Posted Feb 7, 2012 23:29 UTC (Tue)
by daglwn (guest, #65432)
[Link] (1 responses)
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.
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.
Betrayed by a bitfield
> C++11 mode
Betrayed by a bitfield
> 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.Betrayed by a bitfield
Betrayed by a bitfield
