pgsql: Cleanup INFINITY code in float.h

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Cleanup INFINITY code in float.h
Date: 2025-10-07 23:07:38
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Cleanup INFINITY code in float.h

The INFINITY macro is always defined per C99 standard, so this should
mean we can now get rid of the workaround code for when that macro isn't
defined.

Also, delete the (now unneeded) #pragma code which was disabling a
compiler warning in MSVC. There was a comment explaining why the #pragma
was placed outside the function body to work around a MSVC compiler bug,
but the link explaining that was dead, as reported by jian he.

Author: David Rowley <dgrowleyml(at)gmail(dot)com>
Reported-by: jian he <jian(dot)universality(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/CACJufxGARYETnNwtCK7QC0zE_7gq-tfN0mME=gT5rTNtC=VSHQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3bf905692c9db5309c5cd4c0dec7ec17ab8c7af1

Modified Files
--------------
src/include/utils/float.h | 49 +++++++----------------------------------------
1 file changed, 7 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2025-10-08 00:29:27 pgsql: Fix Coverity issues reported in commit 25a30bbd423.
Previous Message Robert Haas 2025-10-07 16:49:47 pgsql: Remove PlannerInfo's join_search_private method.