[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bison-Announce] Bison 3.5.91 released [beta]
From: |
Akim Demaille |
Subject: |
Re: [Bison-Announce] Bison 3.5.91 released [beta] |
Date: |
Sat, 2 May 2020 07:23:22 +0200 |
Hi Dennis!
> Le 1 mai 2020 Γ 16:58, Denis Excoffier <address@hidden> a Γ©crit :
>
>> On 2020-04-29 18:53, Akim Demaille wrote:
>>
>>
>> Hi all,
>>
>> This is the second beta of Bison 3.6, which includes big changes
>> prompted by user feature requests. Dear users, we *need* feedback
>> about these new features, we *need* you to try them on your project to
>> make sure they address your need, to make sure your request was
>> properly understood.
>>
> Hello,
>
> This sounds OK. However, i have still a single error on Cygwin, it is for AT
> 136 "Tabulations and multibyte characters".
>
> The reason is that wchar_t is 16-bit on this platform (i.e. Windows),
> therefore several of the (multibyte) characters in this test
> do not fit. See
> https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00011.html for the
> exact results of this test.
Sorry I had let this report drop :(
The important pieces are here:
# -*- compilation -*-
133. diagnostics.at:266: testing Tabulations and multibyte characters from M4
...
./diagnostics.at:266: LC_ALL="$locale" bison -fcaret --color=debug -Wall
input.y
--- experr 2019-11-16 11:08:53.135244500 +0100
+++ /tmp/lcl/tmp/bison-3.4.90/tests/testsuite.dir/at-groups/133/stderr
2019-11-16 11:08:53.806964600 +0100
@@ -1,6 +1,6 @@
-input.y:10.1-35: <error>error:</error> %define variable 'api.prefix' redefined
- 10 | <error>%define api.prefix {π}</error>
- | <error>^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</error>
+input.y:10.1-36: <error>error:</error> %define variable 'api.prefix' redefined
+ 10 | <error>%define api.prefix {π</error>}
+ | <error>^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</error>
input.y:9.1-37: previous definition
9 | <note>%define api.prefix {sun}</note>
| <note>^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</note>
133. diagnostics.at:266: 133. Tabulations and multibyte characters from M4
(diagnostics.at:266): FAILED (diagnostics.at:266)
This case has been simplified in
https://lists.gnu.org/r/bison-patches/2019-11/msg00004.html, so it's no longer
a problem.
What seems to remain:
# -*- compilation -*-
130. diagnostics.at:162: testing Tabulations and multibyte characters ...
./diagnostics.at:162: LC_ALL="$locale" bison -fcaret --color=debug -Wall
input.y
--- experr 2019-11-16 11:08:38.388700800 +0100
+++ /tmp/lcl/tmp/bison-3.4.90/tests/testsuite.dir/at-groups/130/stderr
2019-11-16 11:08:39.575923900 +0100
@@ -14,9 +14,9 @@
14 | d: <warning>{éééééééééééé}</warning>
| <warning>^~~~~~~~~~~~~~</warning>
| <fixit-insert>%empty</fixit-insert>
-input.y:15.4-17: <warning>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
- 15 | e: <warning>{ββΓπΈβ = -βπ΅β/βt}</warning>
- | <warning>^~~~~~~~~~~~~~</warning>
+input.y:15.4-19: <warning>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
+ 15 | e: <warning>{ββΓπΈβ = -βπ΅β/β</warning>t}
+ | <warning>^~~~~~~~~~~~~~~~</warning>
| <fixit-insert>%empty</fixit-insert>
input.y:16.4-17: <warning>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
16 | f: <warning>{ 42 }</warning>
130. diagnostics.at:162: 130. Tabulations and multibyte characters
(diagnostics.at:162): FAILED (diagnostics.at:162)
> I suggest to SKIP this test in case the number of bits in wchar_t is not 32
> (see BITSIZEOF_WCHAR_T). Indeed, since the
> mbrtowc() and related functions are used, characters using 4 UTF-8 bytes
> cannot be handled properly.
I don't want to drop the whole case for just these characters, so let's split
it instead. I'm ok with skipping the part that requires 32 bits.
However, I would like to make sure your diagnostic is the right one. I'm far
from being an expert on multibyte character support, so I'd like to ask
knowledgeable people first (typically Bruno Haible and Paul Eggert). But
before that, could you please run this little program that Bruno already used
in the past to address a similar failure, but on Solaris?
(https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00020.html)
#include <config.h>
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
#include "mbswidth.h"
int main ()
{
setlocale (LC_ALL, "en_US.UTF-8");
printf ("%d\n", (int) mbswidth ("{ββΓπΈβ = -βπ΅β/βt}",0)); // 14 vs 17
printf ("%d\n", wcwidth (0x2207)); // 1 vs. 2
printf ("%d\n", wcwidth (0x20D7)); // 0
printf ("%d\n", wcwidth (0x00D7)); // 1
printf ("%d\n", wcwidth (0x1D438)); // 1
printf ("%d\n", wcwidth (0x2202)); // 1 vs. 2
printf ("%d\n", wcwidth (0x1D435)); // 1
}
I suggest that you put it in your bison directory, and compile it this way:
> $ gcc foo.c -I _build/g9d/lib -I lib -L _build/g9d/lib -lbison
(_build/g9d is my build tree)
FTR, I have:
> $ ./a.out
> 14
> 1
> 0
> 1
> 1
> 1
> 1
Thanks in advance.
Cheers!
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Denis Excoffier, 2020/05/01
- Re: [Bison-Announce] Bison 3.5.91 released [beta],
Akim Demaille <=
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Denis Excoffier, 2020/05/02
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Akim Demaille, 2020/05/02
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Akim Demaille, 2020/05/02
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Denis Excoffier, 2020/05/02
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Akim Demaille, 2020/05/03
- Re: [Bison-Announce] Bison 3.5.91 released [beta], Akim Demaille, 2020/05/03
- Re: wbswidth: portability to cygwin, Akim Demaille, 2020/05/02