Re: incompatible pointer type

From: Robert Young <yayooo(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: incompatible pointer type
Date: 2011-10-19 17:31:49
Message-ID: CAJjz_Ngf+qK-aW_V4MCz3DKXaMcivOLg+q+ROofu46AM_4MUUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

As I tested, if you explicit appoint a union tag, the OpenBSD m4 and
GNU m4 work identically.
And This explicit definition just corresponding to the forward-declaration.

As mentioned in
http://www.gnu.org/s/bison/manual/html_node/Union-Decl.html
This feature is a POSIX extension.
I don't know what impact to other platform.

So I suppose this should be the appropriate patch to solve this problem

diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y
index 4e2b705..81a91e4 100644
--- a/src/pl/plpgsql/src/gram.y
+++ b/src/pl/plpgsql/src/gram.y
@@ -112,7 +112,7 @@ static List
*read_raise_options(void);
%name-prefix="plpgsql_yy"
%locations

-%union {
+%union YYSTYPE {
core_YYSTYPE core_yystype;
/* these fields must match core_YYSTYPE: */
int ival;

On 2011-10-19, Robert Young <yayooo(at)gmail(dot)com> wrote:
> Perfect!
> I've update my m4 to version 1.4.13
> from:
> http://ftp.openbsd.org/pub/OpenBSD/4.9/packages/amd64/m4-1.4.13.tgz
> the problem solved perfectly!
> Thank You !!!
>
> # /usr/bin/gm4 --version
> m4 (GNU M4) 1.4.13
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Rene' Seindal.
> #
> # M4=/usr/bin/m4 /usr/bin/bison -d -o pl_gram.with_OpenBSD_4.9_original_m4.c gram.y
> # M4=/usr/bin/gm4 /usr/bin/bison -d -o pl_gram.with_GNU_m4_1.4.13.c gram.y

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2011-10-19 18:31:02 Re: Can't use WITH in a PERFORM query in PL/pgSQL?
Previous Message Robert Haas 2011-10-19 12:42:39 Re: BUG #6195: Cannot install any of the installers - TEMP or VC++ Errors