[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: Akim Demaille
Subject: Re: [PATCH 06/11] build: include <config.h> from lib/yyerror.c
Date: Mon, 23 Jan 2012 13:31:56 +0100

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.


> 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?  FTR, I will answer to his message when both branches are fixed.

reply via email to

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