regcomp.c: remove unreached code
authorKarl Williamson <public@khwilliamson.com>
Mon, 27 Dec 2010 04:03:23 +0000 (21:03 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 17 Jan 2011 02:13:23 +0000 (19:13 -0700)
This code can never be reached, as the switch statement switches on the
regkind of the op, not the op itself; and the kind of all the locale
regnodes is the base regnode itself.  For example regkind[ALNUML] is ALNUM.

regcomp.c

index 327abde..341ac74 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -3665,16 +3665,6 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                         }
                    }
                    break;
-               case ALNUML:
-                   if (flags & SCF_DO_STCLASS_AND) {
-                       if (data->start_class->flags & ANYOF_LOCALE)
-                           ANYOF_CLASS_CLEAR(data->start_class,ANYOF_NALNUM);
-                   }
-                   else {
-                       ANYOF_CLASS_SET(data->start_class,ANYOF_ALNUM);
-                       data->start_class->flags |= ANYOF_LOCALE;
-                   }
-                   break;
                case NALNUM:
                    if (flags & SCF_DO_STCLASS_AND) {
                        if (!(data->start_class->flags & ANYOF_LOCALE)) {
@@ -3704,16 +3694,6 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                        }
                    }
                    break;
-               case NALNUML:
-                   if (flags & SCF_DO_STCLASS_AND) {
-                       if (data->start_class->flags & ANYOF_LOCALE)
-                           ANYOF_CLASS_CLEAR(data->start_class,ANYOF_ALNUM);
-                   }
-                   else {
-                       data->start_class->flags |= ANYOF_LOCALE;
-                       ANYOF_CLASS_SET(data->start_class,ANYOF_NALNUM);
-                   }
-                   break;
                case SPACE:
                    if (flags & SCF_DO_STCLASS_AND) {
                        if (!(data->start_class->flags & ANYOF_LOCALE)) {
@@ -3752,16 +3732,6 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                        }
                    }
                    break;
-               case SPACEL:
-                   if (flags & SCF_DO_STCLASS_AND) {
-                       if (data->start_class->flags & ANYOF_LOCALE)
-                           ANYOF_CLASS_CLEAR(data->start_class,ANYOF_NSPACE);
-                   }
-                   else {
-                       data->start_class->flags |= ANYOF_LOCALE;
-                       ANYOF_CLASS_SET(data->start_class,ANYOF_SPACE);
-                   }
-                   break;
                case NSPACE:
                    if (flags & SCF_DO_STCLASS_AND) {
                        if (!(data->start_class->flags & ANYOF_LOCALE)) {
@@ -3800,20 +3770,6 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
                         }
                    }
                    break;
-               case NSPACEL:
-                   if (flags & SCF_DO_STCLASS_AND) {
-                       if (data->start_class->flags & ANYOF_LOCALE) {
-                           ANYOF_CLASS_CLEAR(data->start_class,ANYOF_SPACE);
-                           for (value = 0; value < 256; value++)
-                               if (!isSPACE(value))
-                                   ANYOF_BITMAP_CLEAR(data->start_class, value);
-                       }
-                   }
-                   else {
-                       data->start_class->flags |= ANYOF_LOCALE;
-                       ANYOF_CLASS_SET(data->start_class,ANYOF_NSPACE);
-                   }
-                   break;
                case DIGIT:
                    if (flags & SCF_DO_STCLASS_AND) {
                        ANYOF_CLASS_CLEAR(data->start_class,ANYOF_NDIGIT);