* src/mcs51/gen.c (genNearPointerGet, genNearPointerSet): fixed bug 1938300
[fw/sdcc] / src / SDCC.lex
index 91f8bf319fe1566b56b659e3a41b4774686e552f..6567003c575dfd329e9cfdadf1736369e48975de 100644 (file)
@@ -383,7 +383,7 @@ static int check_type(void)
 
   /* check if it is in the table as a typedef */
   if (!ignoreTypedefType && sym && IS_SPEC (sym->etype)
-      && SPEC_TYPEDEF (sym->etype))
+      && SPEC_TYPEDEF (sym->etype) && findSym(TypedefTab, NULL, yytext))
     return (TYPE_NAME);
   else
     return(IDENTIFIER);
@@ -501,8 +501,10 @@ static const char *stringLiteral(void)
                       dbuf_destroy(&linebuf);
                     }
                   else
-                    unput(ch);
-                  break;
+                    {
+                      unput(ch);
+                      goto out;
+                    }
 
                 default:
                   count_char(ch);