Re: incompatible pointer type - Mailing list pgsql-bugs

From Robert Young
Subject Re: incompatible pointer type
Date
Msg-id CAJjz_NhWWDbPL8H02k1kEKmq8n20VgiRgJsWSZ52_ifyhvvz8A@mail.gmail.com
Whole thread Raw
In response to Re: incompatible pointer type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: incompatible pointer type
List pgsql-bugs
# /usr/bin/bison -V
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
From:
http://ftp.openbsd.org/pub/OpenBSD/4.9/packages/amd64/bison-2.3.tgz

Sure! my pl_gram.c generated by this version of bison is :

    403 typedef union
    404 #line 115 "gram.y"
    405 {
    406                 core_YYSTYPE                    core_yystype;
           .........
    454                 PLpgSQL_case_when               *casewhen;
    455 }
    456 /* Line 193 of yacc.c.  */
    457 #line 458 "pl_gram.c"
    458         YYSTYPE;

and cause the generated pl_gram.c problematic.


On Tue, Oct 18, 2011 at 18:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Young <yayooo@gmail.com> writes:
>> Platform:
>> OpenBSD =C2=A04.9 GENERIC.MP#819 amd64 Intel(R) Xeon(R) CPU E5620 @ 2.40=
GHz
>
> Hmm, what version of bison are you using? =C2=A0Because the ones I've dea=
lt
> with emit
>
> typedef union YYSTYPE {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0...
> } YYSTYPE;
>
> which makes the code correct as-is. =C2=A0Your proposed patch seems to me
> to be making more assumptions about what bison will emit (specifically,
> about the ordering of various code blocks) than what we're doing now.
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0regards, tom lane
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: incompatible pointer type
Next
From: Tom Lane
Date:
Subject: Re: incompatible pointer type