]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Annotate swtich fall-through
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Oct 2025 17:08:30 +0000 (14:08 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 29 Oct 2025 15:54:01 +0000 (12:54 -0300)
The clang default to warning for missing fall-through and it does
not support all comment-like annotation that gcc does.  Use C23
[[fallthrough]] annotation instead.
proper attribute instead.

Reviewed-by: Collin Funk <collin.funk1@gmail.com>
41 files changed:
elf/dl-exception.c
elf/dl-find_object.h
elf/dl-lookup.c
elf/ldconfig.c
elf/rtld.c
iconv/gconv_charset.c
iconvdata/cns11643.h
inet/ruserpass.c
intl/Makefile
locale/programs/charmap-kw.h
locale/programs/charmap.c
locale/programs/locfile-kw.h
locale/programs/repertoire.c
malloc/mcheck-impl.c
misc/mntent_r.c
nis/nis_call.c
nptl/pthread_mutex_trylock.c
nptl/pthread_mutex_unlock.c
nss/digits_dots.c
nss/nss_hash.c
posix/execvpe.c
posix/fnmatch.c
posix/regex_internal.h
posix/wordexp.c
resolv/base64.c
resolv/ns_ttl.c
resolv/nss_dns/dns-host.c
resolv/res_hconf.c
resolv/res_query.c
stdio-common/printf-parsemb.c
stdio-common/vfscanf-internal.c
sunrpc/svc_tcp.c
sunrpc/svc_unix.c
sunrpc/xdr.c
sysdeps/aarch64/fpu/fpu_control.h
sysdeps/ieee754/ldbl-96/e_lgammal_r.c
sysdeps/x86/cpu-features.c
sysdeps/x86/readelflib.c
sysdeps/x86_64/dl-machine.h
time/strftime_l.c
time/strptime_l.c

index 3bdb69662a5236e3666a8b3eef8822ae62abb0a8..f5b88ac0f98dc11c1e53003f715733e4adf9a51b 100644 (file)
@@ -134,7 +134,7 @@ _dl_exception_create_format (struct dl_exception *exception, const char *objname
                  ++p;
                  break;
                }
-             /* Fall through.  */
+             [[fallthrough]];
            case 'x':
              length += INT_WIDTH / 4;
              break;
@@ -219,7 +219,7 @@ _dl_exception_create_format (struct dl_exception *exception, const char *objname
                  ++p;
                  break;
                }
-              /* FALLTHROUGH */
+             [[fallthrough]];
             default:
               _dl_fatal_printf ("Fatal error:"
                                 " invalid format in exception string\n");
index d9d75c4ad9d5784c9d7420fe62cc9822099683e9..92be53fb141beac326ad7d90cbf637865df206f5 100644 (file)
@@ -136,7 +136,7 @@ _dl_find_object_from_map (struct link_map *l,
           atomic_store_relaxed (&result->sframe,
                                 (void *) (ph->p_vaddr + l->l_addr));
           read_seg |= 2;
-          /* Fall through.  */
+         [[fallthrough]];
         default:
           break;
         }
index c32362da4c3813fd269048d88c67a748f377d1e5..7bf8dfbe2f98a8d171f2f239b8c2dc7b87c7ae44 100644 (file)
@@ -490,7 +490,7 @@ do_lookup_x (const char *undef_name, unsigned int new_hash,
                    }
                  break;
                }
-             /* FALLTHROUGH */
+             [[fallthrough]];
            case STB_GLOBAL:
              /* Global definition.  Just what we need.  */
              result->s = sym;
index 39b154c72c7a4966229f075f09d31e9c00d20d5d..a83f256df2debe7d5dd68d9eff3598af3983499e 100644 (file)
@@ -1151,7 +1151,7 @@ parse_conf_include (const char *config_file, unsigned int lineno,
 
     case GLOB_NOSPACE:
       errno = ENOMEM;
-      /* Fall through.  */
+      [[fallthrough]];
     case GLOB_ABORTED:
       if (opt_verbose)
        error (0, errno, _("%s:%u: cannot read directory %s"),
index 8b472e9c0c608e8b5f47989bb2bbfcda8007c8ec..299f8dd60ef4c83c8c94f9b2be3f73704ec0be33 100644 (file)
@@ -2755,10 +2755,10 @@ print_statistics_item (const char *title, hp_timing_t time,
     {
     case 3:
       *wp++ = *cp++;
-      /* Fall through.  */
+      [[fallthrough]];
     case 2:
       *wp++ = *cp++;
-      /* Fall through.  */
+      [[fallthrough]];
     case 1:
       *wp++ = '.';
       *wp++ = *cp++;
index 89de93d689224e1faca7a410acfaf1453b2f30f2..ecf419b0933e24e9b0f1e9020cda0baf5f79776f 100644 (file)
@@ -47,7 +47,7 @@ find_suffix (char *s)
       {
         case '/':
           slash_count++;
-          /* Fallthrough */
+         [[fallthrough]];
         case ',':
           suffix_term = &s[i];
       }
index d4b6f2b4330c3516469ad08e73bce120c332bc45..8c2c3071d5d3e3a0f7fcc1688121368f8e964b3b 100644 (file)
@@ -220,7 +220,7 @@ ucs4_to_cns11643 (uint32_t wch, unsigned char *s, size_t avail)
       if (cp[0] != '\0')
        break;
       /* Let's try the other planes.  */
-      /* Fall through.  */
+      [[fallthrough]];
     case 0x3400 ... 0x4dff:
     case 0x9f9d ... 0x9fa5:
       /* Let's try the other planes.  */
index 903fc966fdee4857d48eaed9a90a5de053373ba7..be4e024203dcb5f20e334636f7a6afdabdf13bc6 100644 (file)
@@ -125,7 +125,7 @@ next:
 
        case DEFAULT:
                usedefault = 1;
-               /* FALL THROUGH */
+               [[fallthrough]];
 
        case MACHINE:
                if (!usedefault) {
index 5aa42597f556f979a114a02ca563ff9867ccd1b0..1d9365e2417fd0022085d1580c52a8322f3e6bb4 100644 (file)
@@ -159,7 +159,8 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
 
 CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
            -D'LOCALE_ALIAS_PATH="$(localedir)"' \
-           -Wno-unused-but-set-variable
+           -Wno-unused-but-set-variable \
+           -Wno-implicit-fallthrough
 BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
 
 $(inst_localedir)/locale.alias: locale.alias $(+force)
index 505b364d88354922545632b2601f58f0aa6a44d9..3ae6f2f6f073e0ed22b5681d7727651d94386ac3 100644 (file)
@@ -104,19 +104,19 @@ hash (register const char *str, register size_t len)
   switch (hval)
     {
       default:
-        hval += asso_values[(unsigned char)str[8]];
-      /*FALLTHROUGH*/
+       hval += asso_values[(unsigned char)str[8]];
+       [[fallthrough]];
       case 8:
       case 7:
       case 6:
       case 5:
         hval += asso_values[(unsigned char)str[4]];
-      /*FALLTHROUGH*/
+       [[fallthrough]];
       case 4:
       case 3:
       case 2:
         hval += asso_values[(unsigned char)str[1]];
-      /*FALLTHROUGH*/
+       [[fallthrough]];
       case 1:
         hval += asso_values[(unsigned char)str[0]];
         break;
index 7768a7a7fc42435968ab101c01a89e86ec654f6f..6927f9be7efd28b73293a097c239a0b405429c37 100644 (file)
@@ -548,7 +548,7 @@ character sets with locking states are not supported"));
              state = 4;
              continue;
            }
-         /* FALLTHROUGH */
+         [[fallthrough]]               ;
 
        case 5:
          if (nowtok != tok_charcode)
@@ -712,7 +712,7 @@ only WIDTH definitions are allowed to follow the CHARMAP definition"));
              state = 95;
              continue;
            }
-         /* Fall through.  */
+         [[fallthrough]]               ;
 
        case 96:
          if (nowtok != tok_number)
index 9460a43ab190879889f502022de0644646074353..dd7ea27615d8aa3c0a27f18f74c2759d5531b87b 100644 (file)
@@ -105,18 +105,18 @@ hash (register const char *str, register size_t len)
     {
       default:
         hval += asso_values[(unsigned char)str[8]];
-      /*FALLTHROUGH*/
+      [[fallthrough]]          ;
       case 8:
       case 7:
       case 6:
       case 5:
         hval += asso_values[(unsigned char)str[4]];
-      /*FALLTHROUGH*/
+      [[fallthrough]]          ;
       case 4:
       case 3:
       case 2:
         hval += asso_values[(unsigned char)str[1]];
-      /*FALLTHROUGH*/
+      [[fallthrough]]          ;
       case 1:
         hval += asso_values[(unsigned char)str[0]];
         break;
index 7ed8c915dd6a83ba69ba099d4de4e4447e3769b9..591d952fadedbbaa0f742e8b2bae5f40baa02bb1 100644 (file)
@@ -206,7 +206,7 @@ argument to <%s> must be a single character"),
 
          /* Otherwise we start reading the character definitions.  */
          state = 2;
-         /* FALLTHROUGH */
+         [[fallthrough]]               ;
 
        case 2:
          /* We are now are in the body.  Each line
@@ -254,7 +254,7 @@ argument to <%s> must be a single character"),
              state = 4;
              continue;
            }
-         /* FALLTHROUGH */
+         [[fallthrough]]               ;
 
        case 5:
          /* We expect a value of the form <Uxxxx> or <Uxxxxxxxx> where
index a874211e7821fb5a7c3e0d6a2a4b8b1f5b6ffa07..6f60c8fa34e6db44a86e4596b662e1b8bd87f91b 100644 (file)
@@ -389,7 +389,7 @@ __mcheck_initialize (void (*func) (enum mcheck_status), bool in_pedantic)
     case -1:
       /* Called before the first malloc was called.  */
       __debug_free (__debug_malloc (0));
-      /* FALLTHROUGH */
+      [[fallthrough]]          ;
     case 0:
       /* Called through the initializer hook.  */
       __malloc_debug_enable (MALLOC_MCHECK_HOOK);
index f36c2f534eab196f03555dc8831f129b7d1f1630..26e8ade30e5da8178fc135ef48a45178ca054ace 100644 (file)
@@ -167,10 +167,10 @@ get_mnt_entry (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
     {
     case 0:
       mp->mnt_freq = 0;
-      /* Fall through.  */
+      [[fallthrough]]          ;
     case 1:
       mp->mnt_passno = 0;
-      /* Fall through.  */
+      [[fallthrough]]          ;
     case 2:
       break;
     }
index f77ecec7090300743e731f85c3c8e7a2913d22f5..357bfadbbccad8b8ecd86a15f48ff7444dd02645 100644 (file)
@@ -324,7 +324,7 @@ __do_niscall3 (dir_binding *dbp, u_long prog, xdrproc_t xargs, caddr_t req,
                }
              /* Yes, the missing break is correct. If we doesn't have to
                 start a callback, look if we have to search another server */
-             /* Fall through.  */
+             [[fallthrough]]           ;
            case NIS_LOOKUP:
            case NIS_ADD:
            case NIS_MODIFY:
index dbb8fcc75475dc9f07afa652179e79cc6341ae0f..bba550683b5d2cb1bb065dd49995c3373a10ad2f 100644 (file)
@@ -68,7 +68,7 @@ ___pthread_mutex_trylock (pthread_mutex_t *mutex)
 
     case PTHREAD_MUTEX_TIMED_NP:
       FORCE_ELISION (mutex, goto elision);
-      /*FALL THROUGH*/
+      [[fallthrough]]          ;
     case PTHREAD_MUTEX_ADAPTIVE_NP:
     case PTHREAD_MUTEX_ERRORCHECK_NP:
       if (lll_trylock (mutex->__data.__lock) != 0)
index 60bea80d20cb58ae56f83fa978b215610b0f6189..ef224c09e55dd92e55741b9b558a74f4aab33be1 100644 (file)
@@ -319,7 +319,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
       if (mutex->__data.__owner != THREAD_GETMEM (THREAD_SELF, tid)
          || (mutex->__data.__lock & ~ PTHREAD_MUTEX_PRIO_CEILING_MASK) == 0)
        return EPERM;
-      /* FALLTHROUGH */
+      [[fallthrough]]          ;
 
     case PTHREAD_MUTEX_PP_NORMAL_NP:
     case PTHREAD_MUTEX_PP_ADAPTIVE_NP:
index e27c57233bbad2cd9b05b3f3e7822d187a50e0e3..7de92344ca2cf4144225ed3f14281d1a26f0315f 100644 (file)
@@ -230,7 +230,7 @@ __nss_hostname_digits_dots_context (struct resolv_context *ctx,
                  addr_size = IN6ADDRSZ;
                  break;
                }
-             /* FALLTHROUGH */
+             [[fallthrough]]           ;
 
            case AF_INET:
              /* This is not possible.  We cannot represent an IPv6 address
index a0bec72668cf17e8ce9bdf9c99b758d348de9878..f20ff59f2665f60358be2a4c299184cc9f3281e6 100644 (file)
@@ -52,13 +52,13 @@ __nss_hash (const void *keyarg, size_t len)
        case 0:
          /* h starts out as zero so no need to include the multiply. */
          h = *key++;
-         /* FALLTHROUGH */
+         [[fallthrough]];
        case 3:
          HASHC;
-         /* FALLTHROUGH */
+         [[fallthrough]];
        case 2:
          HASHC;
-         /* FALLTHROUGH */
+         [[fallthrough]];
        case 1:
          HASHC;
          /* FALLTHROUGH */
index 20a178c1d3a6e8ac044ccd76b27007e228d29768..52115055df7235c30f98df07b310dc9929a1bc0e 100644 (file)
@@ -149,6 +149,7 @@ __execvpe_common (const char *file, char *const argv[], char *const envp[],
             up finding no executable we can use, we want to diagnose
             that we did find one but were denied access.  */
            got_eacces = true;
+           [[fallthrough]]             ;
          case ENOENT:
          case ESTALE:
          case ENOTDIR:
index 32ad3ff23a73595c45b3780f8bb3ce288168d04e..0828509e6a63eb6f13349af0b338c6a08ded3d6a 100644 (file)
@@ -61,7 +61,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #endif
 
 #ifdef _LIBC
-# if __GNUC__ >= 7
+# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
index 722da1b7d2d537db6161dbb5ae14e08f69cad9cf..6664ec6fd88a31fe0267d2ae188c8243e8912e2d 100644 (file)
@@ -834,7 +834,7 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 #endif /* RE_ENABLE_I18N */
 
 #ifdef _LIBC
-# if __GNUC__ >= 7
+# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
index a69b7328013d0d8d9b34bc7dfe240065acb44749..88058278b0fd56ee68f0f9d9300cc26ccea8ab62 100644 (file)
@@ -783,7 +783,7 @@ parse_arith (char **word, size_t *word_length, size_t *max_length,
 
        case '(':
          ++paren_depth;
-         /* Fall through.  */
+         [[fallthrough]]               ;
        default:
          expr = w_addchar (expr, &expr_length, &expr_maxlen, words[*offset]);
          if (expr == NULL)
@@ -2103,7 +2103,7 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length,
 
        case '\'':
          squoting = 1 - squoting;
-         /* Fall through.  */
+         [[fallthrough]]               ;
        default:
          comm = w_addchar (comm, &comm_length, &comm_maxlen, words[*offset]);
          if (comm == NULL)
index 11463235c8d5c47565777e6dd3888f5a7ad10d6e..b09292e067ff115dd0f7e366209ef8fe991fa3e1 100644 (file)
@@ -275,7 +275,7 @@ b64_pton (char const *src, u_char *target, size_t targsize)
                                return (-1);
                        ch = *src++;            /* Skip the = */
                        /* Fall through to "single trailing =" case. */
-                       /* FALLTHROUGH */
+                       [[fallthrough]]         ;
 
                case 3:         /* Valid, means two bytes of info */
                        /*
index d29d9dc00cfcab2c755f7332bc2944ab2feb32c9..e29be12920ece56adc95ecc527a776635b83c84b 100644 (file)
@@ -113,13 +113,13 @@ ns_parse_ttl(const char *src, u_long *dst) {
                        ch = toupper(ch);
                switch (ch) {
                case 'W':  tmp *= 7;
-                 /* Fall through.  */
+                  [[fallthrough]]              ;
                case 'D':  tmp *= 24;
-                 /* Fall through.  */
+                  [[fallthrough]]              ;
                case 'H':  tmp *= 60;
-                 /* Fall through.  */
+                  [[fallthrough]]              ;
                case 'M':  tmp *= 60;
-                 /* Fall through.  */
+                  [[fallthrough]]              ;
                case 'S':  break;
                default:   goto einval;
                }
index 14da73ee1ddb61b1f12724f009b3d35e1f184ad9..d8856653d88cf36d716b2fc5b90c96c80003fe02 100644 (file)
@@ -235,7 +235,7 @@ gethostbyname3_context (struct resolv_context *ctx,
        case EMFILE:
        case ENFILE:
          h_errno = NETDB_INTERNAL;
-         /* Fall through.  */
+         [[fallthrough]]               ;
        case ECONNREFUSED:
        case ETIMEDOUT:
          status = NSS_STATUS_UNAVAIL;
@@ -444,7 +444,7 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
        case EMFILE:
        case ENFILE:
          h_errno = NETDB_INTERNAL;
-         /* Fall through.  */
+         [[fallthrough]]               ;
        case ECONNREFUSED:
        case ETIMEDOUT:
          status = NSS_STATUS_UNAVAIL;
index 186af816905e4d4dd8b5ed85b7f3ad192b145c92..760de6966418744c9efb4031257b3335ab0abcb0 100644 (file)
@@ -146,6 +146,7 @@ arg_trimdomain_list (const char *fname, int line_num, const char *args)
              free (buf);
              return NULL;
            }
+         [[fallthrough]]               ;
        default:
          break;
        }
index bd55453552e9e9c9a40e546dd3fc535185d8b9f1..1eb2287feed45ba32c1cb619093dee9354cf75b9 100644 (file)
@@ -277,7 +277,7 @@ __res_context_query (struct resolv_context *ctx, const char *name,
                            || (hp2->rcode == NOERROR
                                && ntohs (hp2->ancount) != 0))
                                goto success;
-                       /* FALLTHROUGH */
+                       [[fallthrough]]         ;
                case REFUSED:
                default:
                        RES_SET_H_ERRNO(statp, NO_RECOVERY);
@@ -477,7 +477,7 @@ __res_context_search (struct resolv_context *ctx,
                        switch (statp->res_h_errno) {
                        case NO_DATA:
                                got_nodata++;
-                               /* FALLTHROUGH */
+                               [[fallthrough]]         ;
                        case HOST_NOT_FOUND:
                                /* keep trying */
                                break;
@@ -487,7 +487,7 @@ __res_context_search (struct resolv_context *ctx,
                                        got_servfail++;
                                        break;
                                }
-                               /* FALLTHROUGH */
+                               [[fallthrough]]         ;
                        default:
                                /* anything else implies that we're done */
                                done++;
index a7ba52a9fa7b3a125c687133c1c63df3220f65bb..21625036d7de6b8493c1bf03ddfa823a73d2c656 100644 (file)
@@ -272,7 +272,7 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn,
        if (*format != L_('l'))
          break;
        ++format;
-       /* FALLTHROUGH */
+       [[fallthrough]]         ;
       case L_('L'):
        /* doubles are long doubles, and ints are long long ints.  */
       case L_('q'):
index c6361f74e08b81ed32ea7f6c2a3a1bdb59caceea..0870a42c4e1d01dcff967b35c90775c67ba1aa82 100644 (file)
@@ -915,7 +915,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
 
              break;
            }
-         /* FALLTHROUGH */
+         [[fallthrough]];
        case L_('C'):
          if (width == -1)
            width = 1;
@@ -1258,7 +1258,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
                }
              break;
            }
-         /* FALLTHROUGH */
+         [[fallthrough]]               ;
 
        case L_('S'):
          {
index 663b34a71cb44197bab1f1057be9295e9e0d7981..948c22978c4e89176322938bae63ab1313337612 100644 (file)
@@ -334,7 +334,7 @@ readtcp (char *xprtptr, char *buf, int len)
        case -1:
          if (errno == EINTR)
            continue;
-         /*FALLTHROUGH*/
+         [[fallthrough]];
        case 0:
          goto fatal_err;
        default:
index c97880c01230e9645d31c149b3a51cf0003b795b..c8559ea2652b2ffef658a1ed244865622a4b5783 100644 (file)
@@ -440,7 +440,7 @@ readunix (char *xprtptr, char *buf, int len)
        case -1:
          if (errno == EINTR)
            continue;
-         /*FALLTHROUGH*/
+         [[fallthrough]]               ;
        case 0:
          goto fatal_err;
        default:
index a76094d6dab550e116eed407f679c17bf9992e74..e8752a3e529bd09f440b6650ff67d9e49a2aa0af 100644 (file)
@@ -113,7 +113,7 @@ xdr_int (XDR *xdrs, int *ip)
          return FALSE;
        }
       *ip = (int) l;
-      /* Fall through.  */
+      [[fallthrough]]          ;
     case XDR_FREE:
       return TRUE;
     }
@@ -153,7 +153,7 @@ xdr_u_int (XDR *xdrs, u_int *up)
          return FALSE;
        }
       *up = (u_int) (u_long) l;
-      /* Fall through.  */
+      [[fallthrough]]          ;
     case XDR_FREE:
       return TRUE;
     }
@@ -508,7 +508,7 @@ xdr_enum (XDR *xdrs, enum_t *ep)
              return FALSE;
            }
          *ep = l;
-         /* Fall through.  */
+         [[fallthrough]]               ;
        case XDR_FREE:
          return TRUE;
 
@@ -631,7 +631,7 @@ xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
          (void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
          return FALSE;
        }
-      /* Fall through.  */
+      [[fallthrough]]          ;
 
     case XDR_ENCODE:
       return xdr_opaque (xdrs, sp, nodesize);
@@ -752,7 +752,7 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
        {
          return TRUE;          /* already free */
        }
-      /* fall through... */
+      [[fallthrough]]          ;
     case XDR_ENCODE:
       if (sp == NULL)
        return FALSE;
@@ -792,7 +792,7 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
          return FALSE;
        }
       sp[size] = 0;
-      /* Fall through.  */
+      [[fallthrough]]          ;
 
     case XDR_ENCODE:
       return xdr_opaque (xdrs, sp, size);
index a93dbf5efaa833699d029f4d1b9ebc4761fd4938..2ed6ba6b521064965bfed718135f9e4a62a7b76a 100644 (file)
@@ -20,6 +20,7 @@
 #define _AARCH64_FPU_CONTROL_H
 
 #include <features.h>
+#include <sys/types.h>
 
 /* Macros for accessing the FPCR and FPSR.  */
 
index d4fd7f52720189e7bd5416856920921aa4e812aa..7e373201eec922cd4f2e4b4bab9cbd6ff6c7c140 100644 (file)
@@ -402,12 +402,16 @@ __ieee754_lgammal_r (long double x, int *signgamp)
        {
        case 7:
          z *= (y + 6.0);       /* FALLTHRU */
+         [[fallthrough]]               ;
        case 6:
          z *= (y + 5.0);       /* FALLTHRU */
+         [[fallthrough]]               ;
        case 5:
          z *= (y + 4.0);       /* FALLTHRU */
+         [[fallthrough]]               ;
        case 4:
          z *= (y + 3.0);       /* FALLTHRU */
+         [[fallthrough]]               ;
        case 3:
          z *= (y + 2.0);       /* FALLTHRU */
          r += __ieee754_logl (z);
index c696a4d1f79ede8aa94850697ea6035807272a7e..d3409a5b3f0b51158c288833ae7319d6364297fc 100644 (file)
@@ -798,7 +798,7 @@ init_cpu_features (struct cpu_features *cpu_features)
                 processor.  */
              if (stepping > 0xc)
                break;
-             /* Fall through.  */
+             [[fallthrough]]           ;
            case INTEL_BIGCORE_SKYLAKE:
              /* Disable Intel TSX and enable RTM_ALWAYS_ABORT for
                 processors listed in:
@@ -937,7 +937,7 @@ disable_tsx:
             non-temporal on all Skylake servers. */
          cpu_features->preferred[index_arch_Avoid_Non_Temporal_Memset]
            |= bit_arch_Avoid_Non_Temporal_Memset;
-         /* fallthrough */
+         [[fallthrough]]               ;
        case INTEL_BIGCORE_COMETLAKE:
        case INTEL_BIGCORE_SKYLAKE:
        case INTEL_BIGCORE_KABYLAKE:
@@ -1091,7 +1091,7 @@ disable_tsx:
              /* Yongfeng and Shijidadao mircoarch tuning.  */
            case 0x5b:
              cpu_features->cachesize_non_temporal_divisor = 2;
-             /* fallthrough */
+             [[fallthrough]]           ;
            case 0x6b:
              cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
                  &= ~bit_arch_AVX_Fast_Unaligned_Load;
index acb25d710bf4368cf7890976243d864ba9cc1fbb..9b9d626176b26cb66c755bf59be476a76454cb10 100644 (file)
@@ -44,7 +44,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
     case EM_386:
       if (elf_header->e_ident[EI_CLASS] == ELFCLASS32)
        break;
-      /* Fall through.  */
+      [[fallthrough]]          ;
     default:
       error (0, 0, _("%s is for unknown machine %d.\n"),
             file_name, elf_header->e_machine);
index 572a1a7395da0480ab1b980da57893ab74b95992..c765ca14da9ff3a6efedeb16d0a666af0bd34188 100644 (file)
@@ -313,7 +313,7 @@ and creates an unsatisfiable circular dependency.\n",
        {
        case R_X86_64_JUMP_SLOT:
          map->l_has_jump_slot_reloc = true;
-         /* fallthrough */
+         [[fallthrough]];
        case R_X86_64_GLOB_DAT:
          *reloc_addr = value;
          break;
@@ -422,7 +422,7 @@ and creates an unsatisfiable circular dependency.\n",
          /* Set to symbol size plus addend.  */
          value = sym->st_size;
 #  endif
-         /* Fall through.  */
+         [[fallthrough]];
        case R_X86_64_32:
          value += reloc->r_addend;
          *(unsigned int *) reloc_addr = value;
index 5cb5f5d213e9f52c7e2722fb5c4892256e637028..307e7e8fd61113d981b880844d54e0ac19233c5c 100644 (file)
@@ -1093,7 +1093,7 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
 #if !defined _NL_CURRENT && HAVE_STRFTIME
          format_char = L_('p');
 #endif
-         /* FALLTHROUGH */
+         [[fallthrough]]               ;
 
        case L_('p'):
          if (change_case)
@@ -1433,7 +1433,7 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
 
        case L_('\0'):          /* GNU extension: % at end of format.  */
            --f;
-           /* Fall through.  */
+           [[fallthrough]]             ;
        default:
          /* Unknown format; output the format, including the '%',
             since this is most likely the right thing to do if a
index f5e2f4f5d13afdf7f83db86b37dd88778fc8f007..7e6f974aeb645eaa018916f2b9f08b0276cda44f 100644 (file)
@@ -552,7 +552,7 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
              s.decided = raw;
            }
 #endif
-         /* Fall through.  */
+         [[fallthrough]]               ;
        case 'D':
          /* Match standard day format.  */
          if (!recursive (HERE_D_FMT))
@@ -706,7 +706,7 @@ __strptime_internal (const char *rp, const char *fmt, struct tm *tmp,
              s.decided = raw;
            }
 #endif
-         /* Fall through.  */
+         [[fallthrough]]               ;
        case 'T':
          if (!recursive (HERE_T_FMT))
            return NULL;