scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 1725167772a8ad3a3cb5089751c38991532d2cb5
parent 4735283b475d30289ba7384f62b64e4e53406d0e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun,  7 Jul 2013 11:42:14 +0200

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.

Diffstat:
Msymbol.h | 2+-
Mtypes.c | 12++++++------
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/symbol.h b/symbol.h @@ -26,7 +26,7 @@ struct ctype { 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; diff --git a/types.c b/types.c @@ -191,7 +191,7 @@ storage(register struct ctype *tp, unsigned char mod) 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,21 +200,21 @@ storage(register struct ctype *tp, unsigned char mod) 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; 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; 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 @@ storage(register struct ctype *tp, unsigned char mod) 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)