Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christian Kruse <christian(at)2ndQuadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
Date: 2014-01-28 16:18:26
Message-ID: 23486.1390925906@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christian Kruse <christian(at)2ndQuadrant(dot)com> writes:
> just a word of warning: it seems as if there is compiler bug in clang
> regarding the ternary operator when used in ereport(). While working
> on a patch I found that this code:
> ...
> did not emit a errhint when using clang, although errno == ENOMEM was
> true.

Huh. I noticed a buildfarm failure a couple days ago in which the visible
regression diff was that an expected HINT was missing. This probably
explains that, because we use ternary operators in this style in quite a
few places.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-28 16:20:39 Re: A minor correction in comment in heaptuple.c
Previous Message Andres Freund 2014-01-28 16:16:16 Re: A minor correction in comment in heaptuple.c