Remove unused "no-postdims" flag.

This commit is contained in:
David Anderson 2014-07-04 16:41:38 -07:00
parent 7e770908fb
commit 58b9fd57b2
2 changed files with 3 additions and 12 deletions

View File

@ -262,8 +262,7 @@ typedef struct svalue_s {
#define DECLFLAG_ARGUMENT 0x02 // The declaration is for an argument.
#define DECLFLAG_VARIABLE 0x04 // The declaration is for a variable.
#define DECLFLAG_ENUMROOT 0x08 // Multi-dimensional arrays should have an enumroot.
#define DECLFLAG_NO_POSTDIMS 0x10 // Do not parse post-fix dimensions.
#define DECLFLAG_MAYBE_FUNCTION 0x20 // Might be a named function.
#define DECLFLAG_MAYBE_FUNCTION 0x10 // Might be a named function.
#define DECLMASK_NAMED_DECL (DECLFLAG_ARGUMENT | DECLFLAG_VARIABLE | DECLFLAG_MAYBE_FUNCTION)
typedef struct {

View File

@ -3275,7 +3275,7 @@ static int parse_old_decl(declinfo_t *decl, int flags)
}
}
if ((flags & DECLMASK_NAMED_DECL) && !(flags & DECLFLAG_NO_POSTDIMS) && !decl->opertok) {
if ((flags & DECLMASK_NAMED_DECL) && !decl->opertok) {
if (matchtoken('['))
parse_old_array_dims(decl, flags);
}
@ -3316,7 +3316,7 @@ static int parse_new_decl(declinfo_t *decl, const token_t *first, int flags)
}
}
if ((flags & DECLMASK_NAMED_DECL) && !(flags & DECLFLAG_NO_POSTDIMS)) {
if (flags & DECLMASK_NAMED_DECL) {
if (matchtoken('[')) {
if (decl->type.numdim == 0)
parse_old_array_dims(decl, flags);
@ -3401,14 +3401,6 @@ int parse_decl(declinfo_t *decl, int flags)
}
if ((flags & DECLMASK_NAMED_DECL) && matchtoken('[')) {
// If we're not allowing postdims here, then it must be a newdecl.
if (flags & DECLFLAG_NO_POSTDIMS) {
// Give the '[' and symbol back, since we're going to parse from the start.
lexpush();
lexpush();
return parse_new_decl(decl, NULL, flags);
}
// Oh no - we have to parse array dims before we can tell what kind of
// declarator this is. It could be either:
// "x[] y" (new-style), or