It's been a while since I've posted here, so if I'm in the wrong place, I'll repost this in the correct part of the forum.
I'm getting a specific error that appears related to my definition of this enum. It doesn't look like anything is wrong in this enum definition, and I've tried different permutations of typedefs and permutations, but it still throws that warning, which proceeds to cause errors later when the code tries to call cpu->interrupt.
I got this specific code from this GitHub repo and I'm messing around with porting it to the CE. The repo makes it appear that the agnes code has been tested on other platforms/compilers, so I don't immediately think something is wrong with the code. I'm using the latest release of the CE toolchain, so I don't think the error comes from there. I can share more of the code if more context is necessary.
Code:
Code:
I'm getting a specific error that appears related to my definition of this enum. It doesn't look like anything is wrong in this enum definition, and I've tried different permutations of typedefs and permutations, but it still throws that warning, which proceeds to cause errors later when the code tries to call cpu->interrupt.
I got this specific code from this GitHub repo and I'm messing around with porting it to the CE. The repo makes it appear that the agnes code has been tested on other platforms/compilers, so I don't immediately think something is wrong with the code. I'm using the latest release of the CE toolchain, so I don't think the error comes from there. I can share more of the code if more context is necessary.
Code:
[path]/src/agnes/agnes_types.h:32:5: warning: declaration does not declare anything [-Wmissing-declarations]
cpu_interrupt_t interrupt;
Code:
typedef enum {
INTERRUPT_NONE = 1,
INTERRUPT_NMI,
INTERRUPT_IRQ
} cpu_interrupt_t;
typedef struct cpu {
struct agnes *agnes;
uint16_t pc;
uint8_t sp;
uint8_t acc;
uint8_t x;
uint8_t y;
uint8_t flag_carry;
uint8_t flag_zero;
uint8_t flag_dis_interrupt;
uint8_t flag_decimal;
uint8_t flag_overflow;
uint8_t flag_negative;
uint32_t stall;
uint64_t cycles;
cpu_interrupt_t interrupt; // this line here
} cpu_t;