Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMcs6-0005X7-Ti for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2020 19:29:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jMcs5-0006pm-N1 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2020 19:29:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMcs5-0006pf-Fy for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2020 19:29:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMcs3-0005Qs-Dc for pgsql-hackers@postgresql.org; Thu, 09 Apr 2020 19:29:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 039JTnfU026696; Thu, 9 Apr 2020 15:29:49 -0400 From: Tom Lane To: Jeff Janes cc: pgsql-hackers Subject: Re: BUG #16345: ts_headline does not find phrase matches correctly In-reply-to: References: <16345-2e0cf5cddbdcd3b4@postgresql.org> <25072.1586401341@sss.pgh.pa.us> Comments: In-reply-to Jeff Janes message dated "Thu, 09 Apr 2020 14:39:41 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26694.1586460589.1@sss.pgh.pa.us> Date: Thu, 09 Apr 2020 15:29:49 -0400 Message-ID: <26695.1586460589@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeff Janes 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