Re: incompatible pointer type - Mailing list pgsql-bugs

From Robert Young
Subject Re: incompatible pointer type
Date
Msg-id CAJjz_Ngf+qK-aW_V4MCz3DKXaMcivOLg+q+ROofu46AM_4MUUA@mail.gmail.com
Whole thread Raw
In response to Re: incompatible pointer type  (Robert Young <yayooo@gmail.com>)
Responses Re: incompatible pointer type  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@gmail.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

pgsql-bugs by date:

Previous
From: "guenter abraham"
Date:
Subject: BUG #6261: 35.9. C-Language Functions
Next
From: Merlin Moncure
Date:
Subject: Re: Can't use WITH in a PERFORM query in PL/pgSQL?