currently the behaviour for nested anonymous UDTs is to inherit their enclosing UDT's FIELD=N alignment, if none was given explicitly:
Code: Select all
type UDT field = 1
union
'' this one implicitly is FIELD=1 currently,
'' which may be unexpected
end union
union field = 8
'' not this one though,
'' because an explicit FIELD is given here
end union
end type
I'm wondering whether FB's behaviour should be made to match gcc here... that would certainly be desirable, to make FB bindings for C libraries easier.
But on the other hand, changing this could easily break existing code. (and the support for specifying FIELD=N on nested anonymous UDTs only exists since 0.24, so may not be very widely used...)