Akim Demaille | 3 Sep 11:19
Picon
Gravatar

Re: Bison 2.4.1: make install does not install mo files


Le 20 août 09 à 04:29, Joel E. Denny a écrit :

> On Wed, 19 Aug 2009, Akim Demaille wrote:
>
>>> This seems like an important user-visible fix.  Should we turn  
>>> this into a
>>> NEWS entry?
>>
>> If you think so, why not.  How would you phrase it?
>>
>> 	Fix a regression introduced in Bison 2.4.  Under some
>> 	circumstances, translation messages were not installed
>> 	although supported by the host system.
>
> That looks good to me.

Finally installed in master, branch-2.4.2 and branch-2.5 as follows (I  
swapped message and translation):

commit 2755de8fec58b581faed33f76a23eeb681e2edc5
Author: Akim Demaille <demaille <at> gostai.com>
Date:   Thu Sep 3 11:03:14 2009 +0200

     NEWS: Internationalization.

         * NEWS (2.4.2): Add "Internationalization" item.

diff --git a/ChangeLog b/ChangeLog
index 3a1c6c7..d4cdc6d 100644
(Continue reading)

Michael Raskin | 17 Sep 14:41
Picon

[GNU Bison 2.4.1] testsuite: 51 failed (i686-cygwin)


		Hello.
	 The test claims to create file with name `~!@#$%^&*()-=_+{}[]|\:;<>,
.' . It looks like this simply shouldn't succeed on i686-cygwin platform
because of ":" and "\". "/", which is directory separator on most
platforms, is not included in the test file name. Should the test be
corrected?
Jim Meyering | 29 Sep 08:20

[PATCH] build: avoid printf format mismatch warnings

Hello!

I tried to bootstrap/build "master" today, without
success, so switched to branch-2.5.  There, ./bootstrap
succeeded, but the build failed with two like this:

  Sbitset.c: In function 'Sbitset__fprint':
  Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
    has type 'Sbitset__Index

With the change below, the build and "make check" succeeded.

From 25d058425a0a332c5eb4a4dc8914705617efe566 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Tue, 29 Sep 2009 08:17:37 +0200
Subject: [PATCH] build: avoid printf format mismatch warnings

* src/Sbitset.c (Sbitset__fprint): Cast Sbitset__Index to "int"
when printing.
---
 ChangeLog     |    6 ++++++
 src/Sbitset.c |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4b233db..72588ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-29  Jim Meyering  <meyering <at> redhat.com>
(Continue reading)

Joel E. Denny | 29 Sep 13:09
Favicon

Re: [PATCH] build: avoid printf format mismatch warnings

Hi Jim.

On Tue, 29 Sep 2009, Jim Meyering wrote:

> I tried to bootstrap/build "master" today, without
> success, so switched to branch-2.5.  There, ./bootstrap
> succeeded, but the build failed with two like this:
> 
>   Sbitset.c: In function 'Sbitset__fprint':
>   Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
>     has type 'Sbitset__Index

Thanks for the report.  I'm not seeing those failures with either gcc 
4.2.4 or 4.3.4.  Which gcc are you using?

> With the change below, the build and "make check" succeeded.

>    Sbitset__Index i;
>    Sbitset itr;
>    bool first = true;
> -  fprintf (file, "nbits = %d, set = {", nbits);
> +  fprintf (file, "nbits = %d, set = {", (int) nbits);
>    SBITSET__FOR_EACH (self, nbits, itr, i)
>      {
>        if (first)
>          first = false;
>        else
>          fprintf (file, ",");
> -      fprintf (file, " %d", i);
> +      fprintf (file, " %d", (int) i);
(Continue reading)

Jim Meyering | 29 Sep 14:08

Re: [PATCH] build: avoid printf format mismatch warnings

Joel E. Denny wrote:
> On Tue, 29 Sep 2009, Jim Meyering wrote:
>> I tried to bootstrap/build "master" today, without
>> success, so switched to branch-2.5.  There, ./bootstrap
>> succeeded, but the build failed with two like this:
>>
>>   Sbitset.c: In function 'Sbitset__fprint':
>>   Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
>>     has type 'Sbitset__Index
>
> Thanks for the report.  I'm not seeing those failures with either gcc
> 4.2.4 or 4.3.4.  Which gcc are you using?

Hi Joel,

I'm using the stock gcc on an up-to-date Fedora 11 system:

  gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)

>> With the change below, the build and "make check" succeeded.
...
>> -      fprintf (file, " %d", i);
>> +      fprintf (file, " %d", (int) i);
>>      }
>>    fprintf (file, " }");
>>  }
>
> Because Sbitset__index is a size_t, wouldn't the following patch be
> better?
>
(Continue reading)

Joel E. Denny | 29 Sep 14:41
Favicon

Re: [PATCH] build: avoid printf format mismatch warnings

On Tue, 29 Sep 2009, Jim Meyering wrote:

> I'm using the stock gcc on an up-to-date Fedora 11 system:
> 
>   gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)

I'm building that and will try it soon.

> > Because Sbitset__index is a size_t, wouldn't the following patch be
> > better?

> I didn't know (and didn't dig) if it could be negative,
> presumed that the author chose %d for a good reason,

Nope, I was the author, and I was being sloppy.  :)

> I'm glad there was a better say.

Thanks again for the report.  I pushed that patch to master and 
branch-2.5.

Joel E. Denny | 29 Sep 18:58
Favicon

Re: [PATCH] build: avoid printf format mismatch warnings

On Tue, 29 Sep 2009, Jim Meyering wrote:

> Joel E. Denny wrote:
> > On Tue, 29 Sep 2009, Jim Meyering wrote:
> >> I tried to bootstrap/build "master" today, without
> >> success, so switched to branch-2.5.  There, ./bootstrap
> >> succeeded, but the build failed with two like this:
> >>
> >>   Sbitset.c: In function 'Sbitset__fprint':
> >>   Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
> >>     has type 'Sbitset__Index
> >
> > Thanks for the report.  I'm not seeing those failures with either gcc
> > 4.2.4 or 4.3.4.  Which gcc are you using?
> 
> Hi Joel,
> 
> I'm using the stock gcc on an up-to-date Fedora 11 system:
> 
>   gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)

I built gcc 4.4.1 from source.  I built Bison master and branch-2.5 
(before applying the Sbitset patch) with it, but I did not see any 
failures.

Is there anything else in your environment that might matter?  Do you set 
CFLAGS, for example?

It would be nice to know where this is coming from so we can catch future 
problems.
(Continue reading)

Jim Meyering | 29 Sep 19:00

Re: [PATCH] build: avoid printf format mismatch warnings

Joel E. Denny wrote:

> On Tue, 29 Sep 2009, Jim Meyering wrote:
>
>> Joel E. Denny wrote:
>> > On Tue, 29 Sep 2009, Jim Meyering wrote:
>> >> I tried to bootstrap/build "master" today, without
>> >> success, so switched to branch-2.5.  There, ./bootstrap
>> >> succeeded, but the build failed with two like this:
>> >>
>> >>   Sbitset.c: In function 'Sbitset__fprint':
>> >>   Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
>> >>     has type 'Sbitset__Index
>> >
>> > Thanks for the report.  I'm not seeing those failures with either gcc
>> > 4.2.4 or 4.3.4.  Which gcc are you using?
>>
>> Hi Joel,
>>
>> I'm using the stock gcc on an up-to-date Fedora 11 system:
>>
>>   gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
>
> I built gcc 4.4.1 from source.  I built Bison master and branch-2.5
> (before applying the Sbitset patch) with it, but I did not see any
> failures.
>
> Is there anything else in your environment that might matter?  Do you set
> CFLAGS, for example?
>
(Continue reading)

Eric Blake | 29 Sep 16:30
Gravatar

Re: [PATCH] build: avoid printf format mismatch warnings

Joel E. Denny <jdenny <at> clemson.edu> writes:

> Because Sbitset__index is a size_t, wouldn't the following patch be 
> better?
> 
> -  fprintf (file, "nbits = %d, set = {", nbits);
> +  fprintf (file,
> +           "nbits = %" SBITSET__INDEX__CONVERSION_SPEC ", set = {",
> +           nbits);
> 
>  typedef char *Sbitset;
>  typedef size_t Sbitset__Index;
> +#define SBITSET__INDEX__CONVERSION_SPEC "zu"

For this to work on all platforms, you need the gnulib module fprintf-posix 
(sadly, %zu is not completely portable yet).

--

-- 
Eric Blake

Joel E. Denny | 29 Sep 19:14
Favicon

Re: [PATCH] build: avoid printf format mismatch warnings

On Tue, 29 Sep 2009, Jim Meyering wrote:

> Joel E. Denny wrote:
> 
> > On Tue, 29 Sep 2009, Jim Meyering wrote:
> >
> >> Joel E. Denny wrote:
> >> > On Tue, 29 Sep 2009, Jim Meyering wrote:
> >> >> I tried to bootstrap/build "master" today, without
> >> >> success, so switched to branch-2.5.  There, ./bootstrap
> >> >> succeeded, but the build failed with two like this:
> >> >>
> >> >>   Sbitset.c: In function 'Sbitset__fprint':
> >> >>   Sbitset.c:75: error: format '%d' expects type 'int', but argument 3
> >> >>     has type 'Sbitset__Index
> >> >
> >> > Thanks for the report.  I'm not seeing those failures with either gcc
> >> > 4.2.4 or 4.3.4.  Which gcc are you using?
> >>
> >> Hi Joel,
> >>
> >> I'm using the stock gcc on an up-to-date Fedora 11 system:
> >>
> >>   gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
> >
> > I built gcc 4.4.1 from source.  I built Bison master and branch-2.5
> > (before applying the Sbitset patch) with it, but I did not see any
> > failures.
> >
> > Is there anything else in your environment that might matter?  Do you set
(Continue reading)


Gmane