bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] bison: pacify Sun C 5.12


From: Paul Eggert
Subject: Re: [PATCH 5/5] bison: pacify Sun C 5.12
Date: Tue, 22 Oct 2013 18:35:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Akim Demaille wrote:
> Bison is already generating code to define __attribute__.
> That's the code that was in glr.c, and which is now used
> in yacc.c and lalr1.cc too:
> 
> # b4_attribute_define
> # -------------------
> # Provide portability for __attribute__.
> m4_define([b4_attribute_define],
> [#ifndef __attribute__
> /* This feature is available in gcc versions 2.5 and later.  */
> # if (! defined __GNUC__ || __GNUC__ < 2 \
>       || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
> #  define __attribute__(Spec) /* empty */
> # endif
> #endif

Ah, that probably should be updated to match what's in
gnulib/lib/stdio.in.h.  The "5" is a bit tricky
(not that anybody uses compilers that old any more)
and the gnulib version knows about __gnu_printf__
versus __printf__.

> I expect that you would recommend that we define YY_ATTRIBUTE,
> YY_ATTRIBUTE_UNUSED and so forth instead?

That's for the generated code, as opposed to uniqstr.h
which is for Bison itself, right?  Yes, I suppose Bison's
YY* macros should track the latest and greatest from Gnulib.
Perhaps that tracking could be automated?



reply via email to

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