]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix "warning: unannotated fall-through between switch labels".
authorBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2020 23:08:11 +0000 (01:08 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC,
GNULIB_MODULES_LIBGETTEXTPO): Add 'attribute'.
* libtextstyle/autogen.sh (GNULIB_MODULES): Likewise.
* gettext-runtime/intl/plural.y: Include attribute.h. Use FALLTHROUGH annotated
empty statements instead of /* FALLTHROUGH */ comments.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/src/format-boost.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/write-csharp.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-po.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* libtextstyle/gnulib-local/lib/tparm.c: Likewise.
* gettext-runtime/src/escapes.h: Use FALLTHROUGH annotated empty statements
instead of /* FALLTHROUGH */ comments.

31 files changed:
autogen.sh
gettext-runtime/intl/plural.y
gettext-runtime/src/escapes.h
gettext-runtime/src/gettext.c
gettext-runtime/src/ngettext.c
gettext-tools/src/format-boost.c
gettext-tools/src/read-stringtable.c
gettext-tools/src/write-csharp.c
gettext-tools/src/write-java.c
gettext-tools/src/write-po.c
gettext-tools/src/x-awk.c
gettext-tools/src/x-c.c
gettext-tools/src/x-csharp.c
gettext-tools/src/x-elisp.c
gettext-tools/src/x-java.c
gettext-tools/src/x-javascript.c
gettext-tools/src/x-librep.c
gettext-tools/src/x-lisp.c
gettext-tools/src/x-perl.c
gettext-tools/src/x-php.c
gettext-tools/src/x-python.c
gettext-tools/src/x-scheme.c
gettext-tools/src/x-sh.c
gettext-tools/src/x-smalltalk.c
gettext-tools/src/x-tcl.c
gettext-tools/src/x-vala.c
gettext-tools/src/x-ycp.c
gettext-tools/tests/tstgettext.c
gettext-tools/tests/tstngettext.c
libtextstyle/autogen.sh
libtextstyle/gnulib-local/lib/tparm.c

index 0d62f61f8140e1d92e6198458973965691d7e907..b896c3f1e3a362d7f60f9eb4888543a5226b22ec 100755 (executable)
@@ -70,6 +70,7 @@ if ! $skip_gnulib; then
   # In gettext-runtime:
   GNULIB_MODULES_RUNTIME_FOR_SRC='
     atexit
+    attribute
     basename-lgpl
     binary-io
     closeout
@@ -121,6 +122,7 @@ if ! $skip_gnulib; then
   GNULIB_MODULES_TOOLS_FOR_SRC='
     alloca-opt
     atexit
+    attribute
     backupfile
     basename-lgpl
     binary-io
@@ -301,8 +303,9 @@ if ! $skip_gnulib; then
      done` \
     $GNULIB_MODULES_TOOLS_FOR_LIBGREP || exit $?
   # In gettext-tools/libgettextpo:
-  # This is a subset of the GNULIB_MODULES_FOR_SRC.
+  # This is a subset of the GNULIB_MODULES_TOOLS_FOR_SRC.
   GNULIB_MODULES_LIBGETTEXTPO='
+    attribute
     basename-lgpl
     close
     c-ctype
index 676232e10cb8038c87150c65c4d9f9cb9a120ba1..be78cebf8f6cb4bf855182129ce480e1de02a68a 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "plural-exp.h"
+#include "attribute.h"
 
 /* The main function generated by the parser is called __gettextparse,
    but we want it to be called PLURAL_PARSE.  */
@@ -210,13 +211,13 @@ FREE_EXPRESSION (struct expression *exp)
     {
     case 3:
       FREE_EXPRESSION (exp->val.args[2]);
-      /* FALLTHROUGH */
+      FALLTHROUGH;
     case 2:
       FREE_EXPRESSION (exp->val.args[1]);
-      /* FALLTHROUGH */
+      FALLTHROUGH;
     case 1:
       FREE_EXPRESSION (exp->val.args[0]);
-      /* FALLTHROUGH */
+      FALLTHROUGH;
     default:
       break;
     }
index acda05403344a822b9688741a8d03cd1160a10e7..2af7375603cf2ff27993d2d5b79c3f0068d381f1 100644 (file)
@@ -1,5 +1,5 @@
 /* Expand escape sequences in a string.
-   Copyright (C) 1995-1997, 2000-2007, 2012, 2018-2019 Free Software
+   Copyright (C) 1995-1997, 2000-2007, 2012, 2018-2020 Free Software
    Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, May 1995.
 
@@ -112,7 +112,7 @@ expand_escapes (const char *str, bool *backslash_c_seen)
                   ++cp;
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             default:
               *rp++ = '\\';
               break;
index 99fd82d6a00d4bf31b66e82aca2ada0348ec9612..4773fe5f0fc6d5b6f96a37dc42743a427aa7577d 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <locale.h>
 
+#include "attribute.h"
 #include "noreturn.h"
 #include "closeout.h"
 #include "error.h"
@@ -160,7 +161,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\
 
           case 2:
             domain = argv[optind++];
-            /* FALLTHROUGH */
+            FALLTHROUGH;
 
           case 1:
             break;
index d10f2c3c79b15c265cdd723c23f320ecb2d841b0..c0b3ca506cbcea5422ce5e3dca60595dae5fbab7 100644 (file)
@@ -26,6 +26,7 @@
 #include <locale.h>
 #include <errno.h>
 
+#include "attribute.h"
 #include "noreturn.h"
 #include "closeout.h"
 #include "error.h"
@@ -143,7 +144,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\
 
     case 4:
       domain = argv[optind++];
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     case 3:
       break;
index 4cf023cee7ede4bb655a6b0e3752ec66d37d80d0..3f3b9781effb91af570c1f48bb1e1b14698c060e 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdbool.h>
 #include <stdlib.h>
 
+#include "attribute.h"
 #include "format.h"
 #include "c-ctype.h"
 #include "xalloc.h"
@@ -417,7 +418,7 @@ format_parse (const char *format, bool translated, char *fdi,
                         type = FAT_ANY;
                         break;
                       }
-                    /*FALLTHROUGH*/
+                    FALLTHROUGH;
                   default:
                     --format;
                     if (*format == '\0')
index 5e5c6f915fe1b00472a2747128d8ecf88bc6ce4a..7a690dc41d8c28af2431d98301515475d20bc462 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003, 2005-2007, 2009, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005-2007, 2009, 2019-2020 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "error.h"
 #include "error-progname.h"
 #include "read-catalog-abstract.h"
@@ -639,7 +640,7 @@ phase4_getc ()
                                       && !seen_newline);
                     break;
                   }
-                /* FALLTHROUGH */
+                FALLTHROUGH;
 
               default:
                 last_was_star = false;
index 1a238da79f5b972f751d2dac066f2e3d9a73a825..460ab8cd0fa9299557dbdee4cf4eef3a1157a728 100644 (file)
@@ -70,6 +70,7 @@
 # define S_IXOTH (S_IXUSR >> 6)
 #endif
 
+#include "attribute.h"
 #include "c-ctype.h"
 #include "relocatable.h"
 #include "error.h"
@@ -402,7 +403,7 @@ write_csharp_expression (FILE *stream, const struct expression *exp, bool as_boo
               fprintf (stream, ")");
               return;
             }
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
         case var:
         case mult:
         case divide:
index 0b0b13216c8348decf3ec68473bb232af7aa2882..970aae6f08a9ef0922be1c8be54231db23104213 100644 (file)
@@ -53,6 +53,7 @@
 # define S_IXUSR 00100
 #endif
 
+#include "attribute.h"
 #include "c-ctype.h"
 #include "error.h"
 #include "xerror.h"
@@ -624,7 +625,7 @@ write_java_expression (FILE *stream, const struct expression *exp, bool as_boole
               fprintf (stream, ")");
               return;
             }
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
         case var:
         case mult:
         case divide:
index adfa556691603ebd0d5bc4bc29549f4a9e7baaac..4338e8ef404e96660b85c3afb0f71803a0488aea 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2010, 2012, 2014-2015, 2018-2019 Free Software
+   Copyright (C) 1995-1998, 2000-2010, 2012, 2014-2015, 2018-2020 Free Software
    Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
@@ -37,6 +37,7 @@
 
 #include <textstyle.h>
 
+#include "attribute.h"
 #include "c-ctype.h"
 #include "po-charset.h"
 #include "format.h"
@@ -79,7 +80,7 @@ make_format_description_string (enum is_format is_format, const char *lang,
           sprintf (result, "possible-%s-format", lang);
           break;
         }
-      /* FALLTHROUGH */
+      FALLTHROUGH;
     case yes_according_to_context:
     case yes:
       sprintf (result, "%s-format", lang);
index af066ff15a87f870d7a35ed33d19a7037148074c..c2b8ddcd88fecab3d755ff83738a04982da1e3e7 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext awk backend.
-   Copyright (C) 2002-2003, 2005-2009, 2018-2019 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2009, 2018-2020 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -401,7 +402,7 @@ x_awk_lex (token_ty *tp)
              FIXME: Newlines after any of ',' '{' '?' ':' '||' '&&' 'do' 'else'
              does *not* introduce a fresh statement.  */
           prefer_division_over_regexp = false;
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case '\t':
         case ' ':
           /* Ignore whitespace and comments.  */
@@ -428,7 +429,7 @@ x_awk_lex (token_ty *tp)
                 return;
               }
           }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
         case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
         case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
@@ -645,7 +646,7 @@ x_awk_lex (token_ty *tp)
               prefer_division_over_regexp = false;
               return;
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         default:
           /* We could carefully recognize each of the 2 and 3 character
index 08edb12b1e9b69710b7c9f6c81eb3afa01bde483..0f19f966522ee8e74b1d977ef77186bb7c91e437 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -664,7 +665,7 @@ phase1_ungetc (int c)
 
     case '\n':
       --line_number;
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     default:
       if (phase1_pushback_length == SIZEOF (phase1_pushback))
@@ -882,7 +883,7 @@ phase4_getc ()
                   comment_line_end (2);
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
 
             default:
               last_was_star = false;
@@ -1344,7 +1345,7 @@ phase5_get (token_ty *tp)
                           error (0, 0, _("%s:%d: warning: a double-quote in the delimiter of a raw string literal is unsupported"),
                                  logical_file_name, starting_line_number);
                           error_with_progname = true;
-                          /* FALLTHROUGH */
+                          FALLTHROUGH;
                         default:
                           valid_delimiter_char = false;
                           break;
@@ -1450,7 +1451,7 @@ phase5_get (token_ty *tp)
                   tp->type = token_type_symbol;
                   return;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
 
             default:
               phase4_ungetc (c);
@@ -1482,7 +1483,7 @@ phase5_get (token_ty *tp)
           c = '.';
           break;
         }
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     case '0': case '1': case '2': case '3': case '4':
     case '5': case '6': case '7': case '8': case '9':
@@ -1505,7 +1506,7 @@ phase5_get (token_ty *tp)
             case 'P':
               /* In C99 and C++17, 'p' and 'P' can be used as an exponent
                  marker.  */
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case 'e':
             case 'E':
               if (bufpos >= bufmax)
@@ -1586,7 +1587,7 @@ phase5_get (token_ty *tp)
                       break;
                     }
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             default:
               phase4_ungetc (c);
               break;
@@ -1703,7 +1704,7 @@ phase5_get (token_ty *tp)
           tp->comment = add_reference (savable_comment);
           return;
         }
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     default:
       /* We could carefully recognize each of the 2 and 3 character
@@ -2145,7 +2146,7 @@ x_c_lex (xgettext_token_ty *tp)
 
         case token_type_objc_special:
           drop_reference (token.comment);
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         default:
           last_non_comment_line = newline_count;
index 5cf72adbb7484f3b6930e1cc2672bad889794a2a..13d4a531056b149bfb0e517d0623491fb0d7eae2 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -620,7 +621,7 @@ phase4_getc ()
                   comment_line_end (2);
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
 
             default:
               last_was_star = false;
@@ -1496,7 +1497,7 @@ phase6_get (token_ty *tp)
         case UNL:
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\t':
         case '\f':
@@ -1536,7 +1537,7 @@ phase6_get (token_ty *tp)
               tp->type = token_type_dot;
               return;
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         case '0': case '1': case '2': case '3': case '4':
         case '5': case '6': case '7': case '8': case '9':
@@ -1651,7 +1652,7 @@ phase6_get (token_ty *tp)
               tp->type = token_type_string_literal;
               return;
             }
-          /* FALLTHROUGH, so that @identifier is recognized.  */
+          FALLTHROUGH; /* so that @identifier is recognized.  */
 
         default:
           if (c == '\\')
index b29fce5d0c94310be931707dd6b2e8da57542da1..ae0372d5b153e2a6455770741595bf1f38f4d259 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -527,7 +528,7 @@ do_getc_escaped (int c, bool in_string)
       if (c != '-')
         /* Invalid input.  But be tolerant.  */
         return c;
-      /*FALLTHROUGH*/
+      FALLTHROUGH;
     case '^':
       c = do_getc ();
       if (c == EOF)
@@ -1188,7 +1189,7 @@ read_object (struct object *op, bool first_in_list, bool new_backquote_flag,
                 }
             }
           c = '.';
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
         default:
         default_label:
           if (c <= ' ') /* FIXME: Assumes ASCII compatible encoding */
index eff1e6f7f7ad399e29c400236da0a590dc07b532..e89ab95f477603d119ab6cee13d4c1c1011815eb 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -519,7 +520,7 @@ phase4_getc ()
                   comment_line_end (2);
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
 
             default:
               last_was_star = false;
@@ -1060,7 +1061,7 @@ phase5_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\t':
         case '\f':
@@ -1100,7 +1101,7 @@ phase5_get (token_ty *tp)
               tp->type = token_type_dot;
               return;
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         case '0': case '1': case '2': case '3': case '4':
         case '5': case '6': case '7': case '8': case '9':
index 54ab51a7b6d3ab85ef1c47365942e05cadbf4f0c..7545adafbed58aea18c53d4242da8bff70ece245 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -601,7 +602,7 @@ phase3_getc ()
                           comment_line_end (2);
                           break;
                         }
-                      /* FALLTHROUGH */
+                      FALLTHROUGH;
 
                     default:
                       last_was_star = false;
@@ -1146,7 +1147,7 @@ phase5_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\t':
         case '\f':
@@ -1169,7 +1170,7 @@ phase5_get (token_ty *tp)
                 return;
               }
           }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
         case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
         case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
index fc346bf08ddb162e046d58116646a4e04795f0be..d694a0b5184edc1f3e439530abc4c8363619681f 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "c-ctype.h"
 #include "message.h"
 #include "xgettext.h"
@@ -371,7 +372,7 @@ read_token (struct token *tp, const int *first)
                                 radix = 0;
                               break;
                             }
-                          /*FALLTHROUGH*/
+                          FALLTHROUGH;
                         default:
                           if (exponent && (c == '+' || c == '-'))
                             break;
@@ -752,7 +753,7 @@ read_object (struct object *op, flag_context_ty outer_context)
             if (c != EOF && c != '@')
               do_ungetc (c);
           }
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
         case '\'':
         case '`':
           {
@@ -908,7 +909,7 @@ read_object (struct object *op, flag_context_ty outer_context)
                     }
                   continue;
                 }
-              /*FALLTHROUGH*/
+              FALLTHROUGH;
             case '\'':
             case ':':
               {
index 921db484f58100feb217c7eca23c3363696cb19e..0137ffdfb383c661e7e5fde9a99bd2f3b977d911 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -1127,7 +1128,7 @@ read_object (struct object *op, flag_context_ty outer_context)
                 if (c != EOF && c != '@' && c != '.')
                   do_ungetc (c);
               }
-              /*FALLTHROUGH*/
+              FALLTHROUGH;
             case '\'':
             case '`':
               {
@@ -1230,7 +1231,7 @@ read_object (struct object *op, flag_context_ty outer_context)
                   case '(':
                   case '"':
                     do_ungetc (c);
-                    /*FALLTHROUGH*/
+                    FALLTHROUGH;
                   case '\'':
                   case ':':
                   case '.':
index 58892cddf3ba514c96f555f753ca2b3bf3222122..7d58fc3b7525a48ee8c4225826a134a2a0e2d1e3 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -984,7 +985,7 @@ extract_quotelike_pass3 (token_ty *tp, int error_level)
                   buffer[bufpos++] = '\\';
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             default:
               buffer[bufpos++] = *crs++;
               break;
@@ -1666,7 +1667,7 @@ extract_variable (message_list_ty *mlp, token_ty *tp, int first)
                  treat incorrectly here, is a syntax error.  */
               phase1_ungetc (c2);
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         default:
 #if DEBUG_PERL
@@ -2007,7 +2008,7 @@ interpolate_keywords (message_list_ty *mlp, const char *string, int lineno)
               break;
             }
           /* Must be right brace.  */
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case wait_rbrace:
           switch (c)
             {
@@ -2019,7 +2020,7 @@ interpolate_keywords (message_list_ty *mlp, const char *string, int lineno)
               extract_quotelike_pass3 (&token, EXIT_FAILURE);
               remember_a_message (mlp, NULL, token.string, true, false, context,
                                   &pos, NULL, savable_comment, true);
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             default:
               context = null_context;
               state = initial;
@@ -2144,7 +2145,7 @@ x_perl_prelex (message_list_ty *mlp, token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case '\t':
         case ' ':
           /* Ignore whitespace.  */
@@ -2181,7 +2182,7 @@ x_perl_prelex (message_list_ty *mlp, token_ty *tp)
                 return;
               }
           }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
         case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
         case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
@@ -2615,7 +2616,7 @@ x_perl_prelex (message_list_ty *mlp, token_ty *tp)
               if (c != '/')
                 phase1_ungetc (c);
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         default:
           /* We could carefully recognize each of the 2 and 3 character
index 410790961f31cc0d9599431ce0119ae5cbc5a58a..78cce8e1d0068ff355ddea5bbc9c5500af4fad1d 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -667,7 +668,7 @@ phase3_getc ()
                         comment_line_end (2);
                         break;
                       }
-                    /* FALLTHROUGH */
+                    FALLTHROUGH;
 
                   default:
                     last_was_star = false;
@@ -802,7 +803,7 @@ phase4_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\t':
         case '\r':
index 1dee06100ca80a9124bdef34854725e0a0514644..4c95797f79a2ceae48ec69b581c119ec60786a02 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -1223,7 +1224,7 @@ phase5_get (token_ty *tp)
                 return;
               }
           }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
         case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
         case 'M': case 'N': case 'O': case 'P': case 'Q':
index f29bfe5dbefcd83497876017add56b288f7d0d36..f879ab02614d4a7a56566be1f85f6f4919079039 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -830,7 +831,7 @@ read_object (struct object *op, flag_context_ty outer_context)
             if (c != EOF && c != '@')
               do_ungetc (c);
           }
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
         case '\'':
         case '`':
           {
@@ -1220,7 +1221,7 @@ read_object (struct object *op, flag_context_ty outer_context)
                 while (c >= '0' && c <= '9');
                 /* c should be one of {'a'|'b'|'c'|'e'|'i'|'s'|'u'}.
                    But be tolerant.  */
-                /*FALLTHROUGH*/
+                FALLTHROUGH;
               case '\'': /* boot-9.scm */
               case '.': /* boot-9.scm */
               case ',': /* srfi-10.scm */
@@ -1270,7 +1271,7 @@ read_object (struct object *op, flag_context_ty outer_context)
               }
             seen_underscore_prefix = true;
           }
-          /*FALLTHROUGH*/
+          FALLTHROUGH;
 
         case '"':
           {
index 2b0dedc122f3f52e887f7124a2037aee7c09da6a..a3f70086b41742771046aa2939d14942b88d23e9 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -222,7 +223,7 @@ phase1_ungetc (int c)
 
     case '\n':
       --line_number;
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     default:
       if (phase1_pushback_length == SIZEOF (phase1_pushback))
@@ -718,7 +719,7 @@ phase2_ungetc (int c)
 
     case '\n':
       --line_number;
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     default:
       if (phase2_pushback_length == SIZEOF (phase2_pushback))
index d84b307eb3c73ada271f3273674c8bc3230a8a6a..86f6a4ba403566d4991f0a186759c4bb28285a01 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -237,7 +238,7 @@ phase2_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\t':
         case '\r':
index 6b2b36cf7163b6af1f49b0a92b2d24f8c957af2e..f7f7846847df8fa0b14b4fe71545a8711f274a53 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "xgettext.h"
 #include "xg-pos.h"
@@ -220,7 +221,7 @@ phase1_ungetc (int c)
     case '\n':
     case BS_NL:
       --line_number;
-      /* FALLTHROUGH */
+      FALLTHROUGH;
 
     default:
       if (phase1_pushback_length == SIZEOF (phase1_pushback))
index d807f5a6ce86fca33b2632e954e248084a1098f5..e2754f73d2fc06919a696c18386a5c2f7fbd30fe 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -296,7 +297,7 @@ phase2_getc ()
                   comment_line_end (2);
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
 
             default:
               last_was_star = false;
@@ -670,7 +671,7 @@ phase3_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case ' ':
         case '\f':
         case '\t':
@@ -748,7 +749,7 @@ phase3_get (token_ty *tp)
               c = '.';
               break;
             }
-          /* FALLTHROUGH */
+          FALLTHROUGH;
 
         case '0': case '1': case '2': case '3': case '4':
         case '5': case '6': case '7': case '8': case '9':
@@ -845,7 +846,7 @@ phase3_get (token_ty *tp)
               return;
             }
           template = true;
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case '"':
           {
             struct mixed_string_buffer msb;
index 5097b574827988f7ccb127eec5f4843b1a74d715..4f6d16871369ad786e965e16d2124ba4f14b7c6e 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "attribute.h"
 #include "message.h"
 #include "rc-str-list.h"
 #include "xgettext.h"
@@ -245,7 +246,7 @@ phase2_getc ()
                       savable_comment_add (buffer);
                       break;
                     }
-                  /* FALLTHROUGH */
+                  FALLTHROUGH;
 
                 default:
                   last_was_star = false;
@@ -445,7 +446,7 @@ phase5_get (token_ty *tp)
         case '\n':
           if (last_non_comment_line > last_comment_line)
             savable_comment_reset ();
-          /* FALLTHROUGH */
+          FALLTHROUGH;
         case '\r':
         case '\t':
         case ' ':
index e473874fc53e0862f36a042adf53475841b553d7..a855783b05f59a3e3e490c1a752295b8271d71d6 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <locale.h>
 
+#include "attribute.h"
 #include "noreturn.h"
 #include "closeout.h"
 #include "error.h"
@@ -141,7 +142,7 @@ main (int argc, char *argv[])
             break;
           }
       }
-      /*FALLTHROUGH*/
+      FALLTHROUGH;
     default:
       usage (EXIT_FAILURE);
     }
@@ -184,7 +185,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\
 
           case 2:
             domain = argv[optind++];
-            /* FALLTHROUGH */
+            FALLTHROUGH;
 
           case 1:
             break;
index 012399a3d34c293970ac675d05e36ae7c109d425..e9ce5c967afee095506587db4b8615c5c9e78d4a 100644 (file)
@@ -27,6 +27,7 @@
 #include <locale.h>
 #include <errno.h>
 
+#include "attribute.h"
 #include "noreturn.h"
 #include "closeout.h"
 #include "error.h"
@@ -118,7 +119,7 @@ main (int argc, char *argv[])
             break;
           }
       }
-      /*FALLTHROUGH*/
+      FALLTHROUGH;
     default:
       usage (EXIT_FAILURE);
     }
index 740dd6755b098f2aeb431dcf2476c9e0f3f1f4d1..6208751956372c4cb03e22e01e8ccea82094d924 100755 (executable)
@@ -4,7 +4,7 @@
 # also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
 # with new versions of autoconf or automake.
 #
-# This script requires autoconf-2.63..2.71 and automake-1.11..1.16 in the PATH.
+# This script requires autoconf-2.64..2.71 and automake-1.11..1.16 in the PATH.
 # If not used from a released tarball, it also requires
 #   - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout.
 
@@ -85,6 +85,7 @@ if test $skip_gnulib = false; then
       html-styled-ostream
       noop-styled-ostream
       term-styled-ostream
+    attribute
     filename
     isatty
     largefile
index 787667679409065bf7f98dd18dafa3dcf0a969e6..8b376a0e2a667ec5d46be32ffdbcdf4c19f87e7b 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitution of parameters in strings from terminal descriptions.
-   Copyright (C) 2006, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2012, 2020 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include "attribute.h"
 #include "c-ctype.h"
 
 #ifdef USE_SCCS_IDS
@@ -331,7 +332,7 @@ tparm (const char *str, ...)
                   sp++;
                   break;
                 }
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case 'C':
               if (*sp == 'C')
                 {
@@ -347,7 +348,7 @@ tparm (const char *str, ...)
                     }
                 }
               fmt = "%c";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case 'a':
               if (!termcap)
                 return OOPS;
@@ -415,7 +416,7 @@ tparm (const char *str, ...)
               if (fmt == NULL)
                 break;
               sp--;
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case '-':
               if (!termcap)
                 {
@@ -429,7 +430,7 @@ tparm (const char *str, ...)
                   break;
                 }
               fmt = "%c";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case 's':
               if (termcap && (fmt == NULL || *sp == '-'))
                 {
@@ -449,23 +450,23 @@ tparm (const char *str, ...)
                 }
               if (!termcap)
                 return OOPS;
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case '.':
               if (termcap && fmt == NULL)
                 fmt = "%c";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case 'd':
               if (termcap && fmt == NULL)
                 fmt = "%d";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case '2':
               if (termcap && fmt == NULL)
                 fmt = "%02d";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case '3':
               if (termcap && fmt == NULL)
                 fmt = "%03d";
-              /* FALLTHROUGH */
+              FALLTHROUGH;
             case ':': case ' ': case '#': case 'u':
             case 'x': case 'X': case 'o': case 'c':
             case '0': case '1': case '4': case '5':