shithub: scc

Download patch

ref: 1725167772a8ad3a3cb5089751c38991532d2cb5
parent: 4735283b475d30289ba7384f62b64e4e53406d0e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Jul 7 07:42:14 EDT 2013

Rename c_reg field to c_register

All the others modifiers has the full name except register, so the best
solution is doing all of them equal.

--- a/symbol.h
+++ b/symbol.h
@@ -26,7 +26,7 @@
 	bool c_extern : 1;
 	bool c_static : 1;
 	bool c_auto : 1;
-	bool c_reg : 1;
+	bool c_register : 1;
 	bool c_const : 1;
 	bool c_volatile : 1;
 	bool c_restrict : 1;
--- a/types.c
+++ b/types.c
@@ -191,7 +191,7 @@
 	case TYPEDEF:
 		if (tp->c_typedef)
 			goto duplicated;
-		if (tp->c_extern | tp->c_auto | tp->c_reg | tp->c_static)
+		if (tp->c_extern | tp->c_auto | tp->c_register | tp->c_static)
 			goto two_storage;
 		if (tp->c_const || tp->c_volatile)
 			goto bad_typedef;
@@ -200,7 +200,7 @@
 	case EXTERN:
 		if (tp->c_extern)
 			goto duplicated;
-		if (tp->c_typedef | tp->c_auto | tp->c_reg | tp->c_static)
+		if (tp->c_typedef | tp->c_auto | tp->c_register | tp->c_static)
 			goto two_storage;
 		tp->c_extern = 1;
 		return tp;
@@ -207,7 +207,7 @@
 	case STATIC:
 		if (tp->c_static)
 			goto duplicated;
-		if (tp->c_typedef | tp->c_extern | tp->c_auto | tp->c_reg)
+		if (tp->c_typedef | tp->c_extern | tp->c_auto | tp->c_register)
 			goto two_storage;
 		tp->c_static = 1;
 		return tp;
@@ -214,7 +214,7 @@
 	case AUTO:
 		if (curctx == CTX_OUTER)
 			goto bad_file_scope_storage;
-		if (tp->c_typedef | tp->c_extern | tp->c_static | tp->c_reg)
+		if (tp->c_typedef | tp->c_extern | tp->c_static |tp->c_register)
 			goto two_storage;
 		if (tp->c_auto)
 			goto duplicated;
@@ -225,9 +225,9 @@
 			goto bad_file_scope_storage;
 		if (tp->c_typedef | tp->c_extern | tp->c_auto | tp->c_static)
 			goto two_storage;
-		if (tp->c_reg)
+		if (tp->c_register)
 			goto duplicated;
-		tp->c_reg = 1;
+		tp->c_register = 1;
 		return tp;
 	case CONST:
 		if (options.repeat && tp->c_const)
--