Hello,
The problem with your typedef is that bit is not a valid data type. For a bit field structure, a specific bit is an element of that structure, and needs to be referenced as such. As previously described by CrasyCat, the following would seem to represent what you are attempting to achieve.
struct {
word debug :1;
} flags;
#define debug_flag flag.debug
debug_flag = 1;
An alternative to using bit fields is to use bit masks. This might be simplified with the use of the following macros.
// Bit control macros:
#define bset(n,reg) (reg) |= (1 << (n))
#define bclr(n,reg) (reg) &= ~(1 << (n))
#define btest(n,reg) ((reg) & (1 << (n))) // Value 0 or 2^n
#define debug 0
byte flags;
bset(debug, flags);
if (btest(debug, flags) ... ;
Regards,
Mac