Swift: mach-o/nlist.h’s nlist_64 struct loses its n_un field
| Originator: | rix.rob | ||
| Number: | rdar://19192347 | Date Originated: | 09-Dec-2014 01:57 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.1.1 (6A2008a) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
In the header’s definition, the n_un field is a union, which I take it is unsupported in Swift. This union only contains a 32-bit integer, however, so I think it should be representable as a struct:
struct nlist_64 {
struct n_un {
let n_strx: Int32
}
…
}
Steps to Reproduce:
1. Look at how Swift imports the nlist_64 struct from mach-o/nlist.h
Expected Results:
I expected to see a n_un field with a n_strx field within it, or at least to see n_strx at the top level (which would also presumably be semantically valid?).
Actual Results:
It’s just omitted.
Regression:
N/A
Notes:
Only workaround I know of is to drop down to C.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!