From cb1b5aee3503be0f91bd4f33d38262115f303df6 Mon Sep 17 00:00:00 2001
From: Borja Ferrer <faluco@alliedmods.net>
Date: Fri, 14 Jul 2006 02:39:00 +0000
Subject: [PATCH] first step for decl

--HG--
branch : faluco
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/faluco%409
---
 compiler-init/sc.h  | 2 +-
 compiler-init/sc1.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/compiler-init/sc.h b/compiler-init/sc.h
index 25dcd931..7a476a2e 100644
--- a/compiler-init/sc.h
+++ b/compiler-init/sc.h
@@ -332,7 +332,7 @@ typedef struct s_stringpair {
 #define tDECL    299
 #define tOPERATOR 300
 #define tPUBLIC  301
-#define tRETURN  303
+#define tRETURN  302
 #define tSIZEOF  303
 #define tSLEEP   304
 #define tSTATE   305
diff --git a/compiler-init/sc1.c b/compiler-init/sc1.c
index 64f44b92..59a2efdb 100644
--- a/compiler-init/sc1.c
+++ b/compiler-init/sc1.c
@@ -4591,6 +4591,14 @@ static void statement(int *lastindent,int allow_decl)
       error(3);                 /* declaration only valid in a block */
     } /* if */
     break;
+  case tDECL:
+    if (allow_decl) {
+       declloc(FALSE);
+       lastst=tDECL;
+	} else {
+      error(3);                 /* declaration only valid in a block */
+    } /* if */
+    break;
   case tSTATIC:
     if (allow_decl) {
       declloc(TRUE);