[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c
From: |
Jim Meyering |
Subject: |
Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c |
Date: |
Mon, 23 Jan 2012 13:53:50 +0100 |
Akim Demaille wrote:
> Le 23 janv. 2012 à 12:35, Jim Meyering a écrit :
>
>>>> I didn't find anyone using the return value, so rather than
>>>> trying to preserve semantics for nonexistent callers, I opted
>>>> to make this yyerror function return void as documented.
>>>
>>> What do you mean by "as documented"?
>>
>> The one the manual suggest we provide in examples, e.g.,
>>
>> Let's consider an example, vastly simplified from a C++ grammar.
>>
>> %{
>> #include <stdio.h>
>> #define YYSTYPE char const *
>> int yylex (void);
>> void yyerror (char const *);
>> %}
>
> Ah, ok. But it's different, but it is ok to be different: there is some
> degree of freedom on yyerror when one defines it for her own grammar file.
> But we were talking about the "default" one, provided by -ly.
>
>>> So you are engaging yourself gnulib will never #define these guys? :)
>>> Actually, is main.c's setlocale's also protected from such dependencies?
>>
>> I now think it's better not to include <config.h> there, after all.
>> fputs and fputc are far less likely to require replacement.
>>
>> Re setlocale, let's defer crossing that bridge until we come to it.
>> I don't expect gnulib will replace it any time soon.
>
> OK.
>
>> How about this revised patch?
>>
>> From 507aafd6b2388780aad6dfd349c65075c2b378e6 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <address@hidden>
>> Date: Mon, 23 Jan 2012 11:47:46 +0100
>> Subject: [PATCH] build: avoid possibly-replaced fprintf in liby-source,
>> yyerror.c
>
> Fine with me! Please, install (in master, I will cherry-pick it in
> branch-2.5 when it has caught up).
>
> Could you please add Thiru Ramakrishnan <address@hidden> to
> THANKS?
Good catch. I've done that and pushed.
- syntax-check, update bootstrap, update gnulib, Jim Meyering, 2012/01/18
- [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Jim Meyering, 2012/01/18
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/18
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Jim Meyering, 2012/01/18
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/23
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Jim Meyering, 2012/01/23
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/23
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Jim Meyering, 2012/01/23
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/23
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c,
Jim Meyering <=
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/25
- Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Paul Eggert, 2012/01/23
Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c, Akim Demaille, 2012/01/23
[PATCH 03/11] maint: remove final trailing space, Jim Meyering, 2012/01/18
[PATCH 05/11] maint: list djgpp/subpipe.c in po/POTFILES.in, Jim Meyering, 2012/01/18