agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: BUG #16345: ts_headline does not find phrase matches correctly
Date: Thu, 09 Apr 2020 15:29:49 -0400
Message-ID: <26695.1586460589@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1zqTNcxWzFwuRMhJpc5d_q2+j3TbFXiee4PmuGLP0LVnA@mail.gmail.com>
References: <16345-2e0cf5cddbdcd3b4@postgresql.org>
	<25072.1586401341@sss.pgh.pa.us>
	<CAMkU=1zqTNcxWzFwuRMhJpc5d_q2+j3TbFXiee4PmuGLP0LVnA@mail.gmail.com>

Jeff Janes <jeff.janes@gmail.com> writes:
> I am getting a compiler warning, both with and without --enable-cassert.

> wparser_def.c: In function 'prsd_headline':
> wparser_def.c:2530:2: warning: 'pose' may be used uninitialized in this
> function [-Wmaybe-uninitialized]
>   mark_fragment(prs, highlightall, bestb, beste);
>   ^
> wparser_def.c:2384:6: note: 'pose' was declared here
>   int   pose,

I see it too, now that I try a different compiler version.  Will fix.

> It makes no sense to me that pose could be used uninitialized on a line
> that doesn't use pose at all, so maybe it is a compiler bug or something.

It looks like the compiler is doing aggressive inlining, which might
have something to do with the crummy error report placement.  Notice
that this isn't inside 'prsd_headline' at all, so far as the source code
is concerned.

			regards, tom lane





view thread (4+ messages)

Message-ID: <26695.1586460589@sss.pgh.pa.us>
Permalink:  ../26695.1586460589@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26695.1586460589@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: BUG #16345: ts_headline does not find phrase matches correctly
  In-Reply-To: <26695.1586460589@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox