/[tinycc]/tinycc/tcc.c
ViewVC logotype

Diff of /tinycc/tcc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.140 by bellard, Sun Jul 20 12:40:53 2003 UTC revision 1.141 by bellard, Sun Jul 20 18:44:29 2003 UTC
# Line 6204  static void struct_decl(CType *type, int Line 6204  static void struct_decl(CType *type, int
6204   */   */
6205  static int parse_btype(CType *type, AttributeDef *ad)  static int parse_btype(CType *type, AttributeDef *ad)
6206  {  {
6207      int t, u, type_found;      int t, u, type_found, typespec_found;
6208      Sym *s;      Sym *s;
6209      CType type1;      CType type1;
6210    
6211      memset(ad, 0, sizeof(AttributeDef));      memset(ad, 0, sizeof(AttributeDef));
6212      type_found = 0;      type_found = 0;
6213        typespec_found = 0;
6214      t = 0;      t = 0;
6215      while(1) {      while(1) {
6216          switch(tok) {          switch(tok) {
# Line 6227  static int parse_btype(CType *type, Attr Line 6228  static int parse_btype(CType *type, Attr
6228              if ((t & VT_BTYPE) != 0)              if ((t & VT_BTYPE) != 0)
6229                  error("too many basic types");                  error("too many basic types");
6230              t |= u;              t |= u;
6231                typespec_found = 1;
6232              break;              break;
6233          case TOK_VOID:          case TOK_VOID:
6234              u = VT_VOID;              u = VT_VOID;
# Line 6236  static int parse_btype(CType *type, Attr Line 6238  static int parse_btype(CType *type, Attr
6238              goto basic_type;              goto basic_type;
6239          case TOK_INT:          case TOK_INT:
6240              next();              next();
6241                typespec_found = 1;
6242              break;              break;
6243          case TOK_LONG:          case TOK_LONG:
6244              next();              next();
# Line 6287  static int parse_btype(CType *type, Attr Line 6290  static int parse_btype(CType *type, Attr
6290              t |= VT_VOLATILE;              t |= VT_VOLATILE;
6291              next();              next();
6292              break;              break;
         case TOK_REGISTER:  
6293          case TOK_SIGNED1:          case TOK_SIGNED1:
6294          case TOK_SIGNED2:          case TOK_SIGNED2:
6295          case TOK_SIGNED3:          case TOK_SIGNED3:
6296                typespec_found = 1;
6297            case TOK_REGISTER:
6298          case TOK_AUTO:          case TOK_AUTO:
6299          case TOK_RESTRICT1:          case TOK_RESTRICT1:
6300          case TOK_RESTRICT2:          case TOK_RESTRICT2:
# Line 6300  static int parse_btype(CType *type, Attr Line 6304  static int parse_btype(CType *type, Attr
6304          case TOK_UNSIGNED:          case TOK_UNSIGNED:
6305              t |= VT_UNSIGNED;              t |= VT_UNSIGNED;
6306              next();              next();
6307                typespec_found = 1;
6308              break;              break;
6309    
6310              /* storage */              /* storage */
# Line 6335  static int parse_btype(CType *type, Attr Line 6340  static int parse_btype(CType *type, Attr
6340              parse_expr_type(&type1);              parse_expr_type(&type1);
6341              goto basic_type2;              goto basic_type2;
6342          default:          default:
6343                if (typespec_found)
6344                    goto the_end;
6345              s = sym_find(tok);              s = sym_find(tok);
6346              if (!s || !(s->type.t & VT_TYPEDEF))              if (!s || !(s->type.t & VT_TYPEDEF))
6347                  goto the_end;                  goto the_end;

Legend:
Removed from v.1.140  
changed lines
  Added in v.1.141

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26