Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "anonymous types declared in an anonymous union" warnings #44807

Merged
merged 1 commit into from
Apr 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ typedef struct _jl_line_info_node_t {
intptr_t inlined_at;
} jl_line_info_node_t;

// the following mirrors `struct EffectsOverride` in `base/compiler/types.jl`
typedef union __jl_purity_overrides_t {
struct {
uint8_t ipo_consistent : 1;
Expand Down Expand Up @@ -390,6 +391,8 @@ typedef struct _jl_code_instance_t {
//TODO: uint8_t absolute_max; // whether true max world is unknown

// purity results
#ifdef JL_USE_ANON_UNIONS_FOR_PURITY_FLAGS
// see also encode_effects() and decode_effects() in `base/compiler/types.jl`,
union {
uint32_t ipo_purity_bits;
struct {
Expand All @@ -410,6 +413,10 @@ typedef struct _jl_code_instance_t {
uint8_t nonoverlayed:1;
} purity_flags;
};
#else
uint32_t ipo_purity_bits;
uint32_t purity_bits;
#endif
jl_value_t *argescapes; // escape information of call arguments

// compilation state cache
Expand Down