# HG changeset patch # User kono # Date 1089006020 -32400 # Node ID 5cf12c7a327419291b1010f433203c6150a6c122 # Parent 93652cda75c77e89ea23e921f3fdf10eb7f5c190 local label first try diff -r 93652cda75c7 -r 5cf12c7a3274 Changes --- a/Changes Mon Jul 05 13:55:46 2004 +0900 +++ b/Changes Mon Jul 05 14:40:20 2004 +0900 @@ -5502,3 +5502,7 @@ �ʤ�type �� tag ��global�ˤ���Τ��̤ä�����... scope �˴ؤ��Ƥϡ��⤦�����ƥ��Ȥ�ʤ��Ȥ�����ʡ� + +Mon Jul 5 14:11:07 JST 2004 + +local label �͡��ޤ�����ñ�ʤ������... diff -r 93652cda75c7 -r 5cf12c7a3274 mc-codegen.c --- a/mc-codegen.c Mon Jul 05 13:55:46 2004 +0900 +++ b/mc-codegen.c Mon Jul 05 14:40:20 2004 +0900 @@ -2441,6 +2441,10 @@ case LTDECL: nsc = TYPE; break; + case LLDECL: + nsc = BLABEL; + n->dsp = backdef(); + break; case ADECL: if(!integral(type)&&(car(type)==FUNCTION||car(type)==CODE)) { type=list2(POINTER,type); n->ty = type; diff -r 93652cda75c7 -r 5cf12c7a3274 mc-parse.c --- a/mc-parse.c Mon Jul 05 13:55:46 2004 +0900 +++ b/mc-parse.c Mon Jul 05 14:40:20 2004 +0900 @@ -398,6 +398,7 @@ reserve("typeof",TYPEOF); reserve("__typeof__",TYPEOF); reserve("__builtin_alloca",ALLOCA); + reserve("__label__",LABEL); #if ASM_CODE reserve("asm",ASM); reserve("__asm__",ASM); @@ -578,6 +579,11 @@ stmode=EXTRN; } else error(DCERR); + } else if(sym==LABEL) { + if(mode==LDECL) { + getsym(0); + mode = LLDECL; + } else error(DCERR); } else if(sym==TYPEDEF) { if(mode==GDECL) { getsym(0); @@ -1440,7 +1446,7 @@ /* local variable declaration */ stmode=0; mode=STAT; - while (typeid(getsym(0)) || sym==STATIC || sym==EXTRN + while (typeid(getsym(0)) || sym==STATIC || sym==EXTRN || sym==LABEL || sym==REGISTER || sym==TYPEDEF) { mode=LDECL; stmode=0; @@ -1696,8 +1702,7 @@ getsym(0); checksym(LPAR); slfree=lfree; - if (typeid(sym) || sym==STATIC || sym==EXTRN - || sym==REGISTER || sym==TYPEDEF) { + if (typeid(sym) || sym==REGISTER ) { enter_scope(); dflag = 1; mode=LDECL; stmode=0; diff -r 93652cda75c7 -r 5cf12c7a3274 mc.h --- a/mc.h Mon Jul 05 13:55:46 2004 +0900 +++ b/mc.h Mon Jul 05 14:40:20 2004 +0900 @@ -68,7 +68,8 @@ #define ULONGLONG (-56) #define VOLATILE (-57) #define TYPEOF (-58) -#define ASM (-59) +#define LABEL (-59) +#define ASM (-60) /* reserved word end */ @@ -91,7 +92,8 @@ #define MDECL 13 #define GEDECL 14 #define LEDECL 15 -#define SFDINIT 16 +#define LLDECL 16 +#define SFDINIT 17 /* mode end */ #define US 1 diff -r 93652cda75c7 -r 5cf12c7a3274 stdio.h --- a/stdio.h Mon Jul 05 13:55:46 2004 +0900 +++ b/stdio.h Mon Jul 05 14:40:20 2004 +0900 @@ -1,4 +1,4 @@ -#ifndef __micro_c__aaa +#ifndef __micro_c__ #include "/usr/include/stdio.h" long long strtoll(const char *, char **, int); char *malloc(int);