diff --git a/src/cc65/declare.c b/src/cc65/declare.c index d16a095a3..09a3f0020 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -507,7 +507,7 @@ static SymEntry* ParseStructDecl (const char* Name, TypeCode StructType) } /* Get type and name of the struct field */ - ParseDecl (&Spec, &Decl, 0); + ParseDecl (&Spec, &Decl, DM_NEED_IDENT); /* Get the offset of this field */ Offs = (StructType == T_STRUCT)? StructSize : 0; @@ -1049,7 +1049,7 @@ static FuncDesc* ParseFuncDecl (void) -static void Declarator (const DeclSpec* Spec, Declaration* D, unsigned Mode) +static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode) /* Recursively process declarators. Build a type array in reverse order. */ { /* Read optional function or pointer qualifiers. These modify the @@ -1213,7 +1213,7 @@ Type* ParseType (Type* T) -void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode) +void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode) /* Parse a variable, type or function declaration */ { /* Initialize the Declaration struct */ diff --git a/src/cc65/declare.h b/src/cc65/declare.h index fb510ef30..eac2897d9 100644 --- a/src/cc65/declare.h +++ b/src/cc65/declare.h @@ -75,9 +75,11 @@ struct Declaration { }; /* Modes for ParseDecl */ -#define DM_NEED_IDENT 0U /* We must have an identifier */ -#define DM_NO_IDENT 1U /* We won't read an identifier */ -#define DM_ACCEPT_IDENT 2U /* We will accept an id if there is one */ +typedef enum { + DM_NEED_IDENT, /* We must have an identifier */ + DM_NO_IDENT, /* We won't read an identifier */ + DM_ACCEPT_IDENT, /* We will accept an id if there is one */ +} declmode_t; @@ -90,7 +92,7 @@ struct Declaration { Type* ParseType (Type* Type); /* Parse a complete type specification */ -void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode); +void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode); /* Parse a variable, type or function declaration */ void ParseDeclSpec (DeclSpec* D, unsigned DefStorage, long DefType);