From 703447dd262dde0eb8d5d0855035dbb443904297 Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 28 Jan 2003 16:28:41 +0000 Subject: [PATCH] Locals with a qualifier and implicit int type where not parsed correctly git-svn-id: svn://svn.cc65.org/cc65/trunk@1910 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/locals.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/cc65/locals.c b/src/cc65/locals.c index a4411e410..18cfe3334 100644 --- a/src/cc65/locals.c +++ b/src/cc65/locals.c @@ -6,9 +6,9 @@ /* */ /* */ /* */ -/* (C) 2000-2002 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ +/* (C) 2000-2003 Ullrich von Bassewitz */ +/* Roemerstrasse 52 */ +/* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ /* */ /* */ @@ -453,12 +453,15 @@ void DeclareLocals (void) /* Check variable declarations. We need to distinguish between a * default int type and the end of variable declarations. So we * will do the following: If there is no explicit storage class - * specifier *and* no explicit type given, it is assume that we - * have reached the end of declarations. + * specifier *and* no explicit type given, *and* no type qualifiers + * have been read, it is assumed that we have reached the end of + * declarations. */ DeclSpec Spec; ParseDeclSpec (&Spec, SC_AUTO, T_INT); - if ((Spec.Flags & DS_DEF_STORAGE) != 0 && (Spec.Flags & DS_DEF_TYPE) != 0) { + if ((Spec.Flags & DS_DEF_STORAGE) != 0 && /* No storage spec */ + (Spec.Flags & DS_DEF_TYPE) != 0 && /* No type given */ + GetQualifier (Spec.Type) == T_QUAL_NONE) { /* No type qualifier */ break; } -- 2.39.5