texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Fix parsetexi compilation errors


From: Gavin D. Smith
Subject: branch master updated: Fix parsetexi compilation errors
Date: Sun, 23 Jul 2023 11:46:57 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 767135a31d Fix parsetexi compilation errors
767135a31d is described below

commit 767135a31dd6f031d520d8d14707c6bc23057968
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Jul 23 16:46:31 2023 +0100

    Fix parsetexi compilation errors
    
    * tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments):
    Place case label after block variable declarations to prevent
    gcc error 'a label can only be part of a statement and a
    declaration is not a statement'.
---
 ChangeLog                       | 9 +++++++++
 tp/Texinfo/XS/parsetexi/macro.c | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dab3076b1f..d341423542 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-07-23  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Fix parsetexi compilation errors
+
+       * tp/Texinfo/XS/parsetexi/macro.c (expand_linemacro_arguments):
+       Place case label after block variable declarations to prevent
+       gcc error 'a label can only be part of a statement and a
+       declaration is not a statement'.
+
 2023-07-23  Patrice Dumas  <pertusus@free.fr>
 
        * doc/tp_api/Makefile.am (AM_MAKEINFOFLAGS): add the
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 82062e5a5c..d6107d395a 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -536,10 +536,11 @@ expand_linemacro_arguments (ELEMENT *macro, char 
**line_inout,
 
       switch (*sep)
         {
-        case '@':
           int single_char;
           char *command;
           enum command_id cmd;
+          int whitespaces_len;
+        case '@':
           text_append_n (arg, sep, 1);
           pline = sep + 1;
           command = parse_command_name (&pline, &single_char);
@@ -572,7 +573,6 @@ expand_linemacro_arguments (ELEMENT *macro, char 
**line_inout,
           break;
         /* spaces */
         default:
-          int whitespaces_len;
           pline = sep;
           whitespaces_len = strspn (pline, whitespace_chars_except_newline);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]