[BACK]Return to scan.l CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / xlint / lint1

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/xlint/lint1/scan.l between version 1.80 and 1.80.2.5

version 1.80, 2018/01/15 21:58:54 version 1.80.2.5, 2019/01/18 08:51:02
Line 205  static struct kwtab {
Line 205  static struct kwtab {
         u_int   kw_attr : 1;    /* GCC attribute, keyword */          u_int   kw_attr : 1;    /* GCC attribute, keyword */
         u_int   kw_deco : 3;    /* name[1] __name[2] __name__[4] */          u_int   kw_deco : 3;    /* name[1] __name[2] __name__[4] */
 } kwtab[] = {  } kwtab[] = {
   #ifdef INT128_SIZE
           { "__int128_t", T_TYPE,         0,      INT128, 0,        0,1,0,0,1 },
           { "__uint128_t",T_TYPE,         0,      UINT128,0,        0,1,0,0,1 },
   #endif
         { "_Bool",      T_TYPE,         0,      BOOL,   0,        0,1,0,0,1 },          { "_Bool",      T_TYPE,         0,      BOOL,   0,        0,1,0,0,1 },
         { "_Complex",   T_TYPE,         0,      COMPLEX,0,        0,1,0,0,1 },          { "_Complex",   T_TYPE,         0,      COMPLEX,0,        0,1,0,0,1 },
         { "_Generic",   T_GENERIC,      0,      0,      0,        0,1,0,0,1 },          { "_Generic",   T_GENERIC,      0,      0,      0,        0,1,0,0,1 },
Line 228  static struct kwtab {
Line 232  static struct kwtab {
         { "continue",   T_CONTINUE,     0,      0,      0,        0,0,0,0,1 },          { "continue",   T_CONTINUE,     0,      0,      0,        0,0,0,0,1 },
         { "default",    T_DEFAULT,      0,      0,      0,        0,0,0,0,1 },          { "default",    T_DEFAULT,      0,      0,      0,        0,0,0,0,1 },
         { "deprecated", T_AT_DEPRECATED,0,      0,      0,        0,0,1,1,5 },          { "deprecated", T_AT_DEPRECATED,0,      0,      0,        0,0,1,1,5 },
           { "destructor", T_AT_DESTRUCTOR,0,      0,      0,        0,0,1,1,5 },
         { "do",         T_DO,           0,      0,      0,        0,0,0,0,1 },          { "do",         T_DO,           0,      0,      0,        0,0,0,0,1 },
         { "double",     T_TYPE,         0,      DOUBLE, 0,        0,0,0,0,1 },          { "double",     T_TYPE,         0,      DOUBLE, 0,        0,0,0,0,1 },
         { "else",       T_ELSE,         0,      0,      0,        0,0,0,0,1 },          { "else",       T_ELSE,         0,      0,      0,        0,0,0,0,1 },
Line 251  static struct kwtab {
Line 256  static struct kwtab {
         { "no_instrument_function", T_AT_NO_INSTRUMENT_FUNCTION,          { "no_instrument_function", T_AT_NO_INSTRUMENT_FUNCTION,
                                         0,      0,      0,        0,0,1,1,5 },                                          0,      0,      0,        0,0,1,1,5 },
         { "nonnull",    T_AT_NONNULL,   0,      0,      0,        0,0,1,1,5 },          { "nonnull",    T_AT_NONNULL,   0,      0,      0,        0,0,1,1,5 },
           { "noinline",   T_AT_NOINLINE,  0,      0,      0,        0,0,1,1,5 },
         { "noreturn",   T_AT_NORETURN,  0,      0,      0,        0,0,1,1,5 },          { "noreturn",   T_AT_NORETURN,  0,      0,      0,        0,0,1,1,5 },
         { "packed",     T_AT_PACKED,    0,      0,      0,        0,0,1,1,5 },          { "packed",     T_AT_PACKED,    0,      0,      0,        0,0,1,1,5 },
         { "packed",     T_PACKED,       0,      0,      0,        0,0,0,0,2 },          { "packed",     T_PACKED,       0,      0,      0,        0,0,0,0,2 },
Line 275  static struct kwtab {
Line 281  static struct kwtab {
         { "struct",     T_SOU,          0,      STRUCT, 0,        0,0,0,0,1 },          { "struct",     T_SOU,          0,      STRUCT, 0,        0,0,0,0,1 },
         { "switch",     T_SWITCH,       0,      0,      0,        0,0,0,0,1 },          { "switch",     T_SWITCH,       0,      0,      0,        0,0,0,0,1 },
         { "symbolrename", T_SYMBOLRENAME, 0,    0,      0,        0,0,0,0,2 },          { "symbolrename", T_SYMBOLRENAME, 0,    0,      0,        0,0,0,0,2 },
           { "syslog",     T_AT_FORMAT_SYSLOG,0,   0,      0,        0,0,1,1,5 },
         { "transparent_union",T_AT_TUNION,0,    0,      0,        0,0,1,1,5 },          { "transparent_union",T_AT_TUNION,0,    0,      0,        0,0,1,1,5 },
         { "typedef",    T_SCLASS,       TYPEDEF, 0,     0,        0,0,0,0,1 },          { "typedef",    T_SCLASS,       TYPEDEF, 0,     0,        0,0,0,0,1 },
         { "typeof",     T_TYPEOF,       0,      0,      0,        0,0,1,0,7 },          { "typeof",     T_TYPEOF,       0,      0,      0,        0,0,1,0,7 },
Line 285  static struct kwtab {
Line 292  static struct kwtab {
         { "visibility", T_AT_VISIBILITY,0,      0,      0,        0,0,1,1,5 },          { "visibility", T_AT_VISIBILITY,0,      0,      0,        0,0,1,1,5 },
         { "void",       T_TYPE,         0,      VOID,   0,        0,0,0,0,1 },          { "void",       T_TYPE,         0,      VOID,   0,        0,0,0,0,1 },
         { "volatile",   T_QUAL,         0,      0,      VOLATILE, 1,0,0,0,7 },          { "volatile",   T_QUAL,         0,      0,      VOLATILE, 1,0,0,0,7 },
           { "warn_unused_result", T_AT_WARN_UNUSED_RESULT, 0, 0, 0, 0,0,1,1,5 },
         { "weak",       T_AT_WEAK,      0,      0,      0,        0,0,1,1,5 },          { "weak",       T_AT_WEAK,      0,      0,      0,        0,0,1,1,5 },
         { "while",      T_WHILE,        0,      0,      0,        0,0,0,0,1 },          { "while",      T_WHILE,        0,      0,      0,        0,0,0,0,1 },
         { NULL,         0,              0,      0,      0,        0,0,0,0,0 }          { NULL,         0,              0,      0,      0,        0,0,0,0,0 }
Line 551  icon(int base)
Line 559  icon(int base)
         const   char *cp;          const   char *cp;
         char    c, *eptr;          char    c, *eptr;
         tspec_t typ;          tspec_t typ;
         uint64_t uq = 0;  
         int     ansiu;          int     ansiu;
   #ifdef TARG_INT128_MAX
           __uint128_t uq = 0;
           static  tspec_t contypes[2][4] = {
                   { INT,  LONG,  QUAD, INT128, },
                   { UINT, ULONG, UQUAD, UINT128, }
           };
   #else
           uint64_t uq = 0;
         static  tspec_t contypes[2][3] = {          static  tspec_t contypes[2][3] = {
                 { INT,  LONG,  QUAD },                  { INT,  LONG,  QUAD, },
                 { UINT, ULONG, UQUAD }                  { UINT, ULONG, UQUAD, }
         };          };
   #endif
   
         cp = yytext;          cp = yytext;
         len = yyleng;          len = yyleng;
Line 673  icon(int base)
Line 689  icon(int base)
                         warning(252);                          warning(252);
                 }                  }
                 break;                  break;
   #ifdef INT128_SIZE
           case INT128:
   #ifdef TARG_INT128_MAX
                   if (uq > TARG_INT128_MAX && !tflag) {
                           typ = UINT128;
                           if (!sflag)
                                   ansiu = 1;
                   }
   #endif
                   break;
           case UINT128:
   #ifdef TARG_INT128_MAX
                   if (uq > TARG_UINT128_MAX) {
                           /* integer constant out of range */
                           warning(252);
                   }
   #endif
                   break;
   #endif
                 /* LINTED206: (enumeration values not handled in switch) */                  /* LINTED206: (enumeration values not handled in switch) */
         case STRUCT:          case STRUCT:
         case VOID:          case VOID:

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.80.2.5

CVSweb <webmaster@jp.NetBSD.org>