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 02:24:45
Message-ID: CAJjz_NhWWDbPL8H02k1kEKmq8n20VgiRgJsWSZ52_ifyhvvz8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Young <yayooo(at)gmail(dot)com> writes:
>> Platform:
>> OpenBSD  4.9 GENERIC.MP#819 amd64 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
>
> Hmm, what version of bison are you using?  Because the ones I've dealt
> with emit
>
> typedef union YYSTYPE {
>        ...
> } YYSTYPE;
>
> which makes the code correct as-is.  Your 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.
>
>                        regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-10-19 02:56:51 Re: incompatible pointer type
Previous Message Tom Lane 2011-10-18 18:22:20 Re: incompatible pointer type