| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add pg_assume(expr) macro |
| Date: | 2025-07-09 23:20:25 |
| Message-ID: | E1uZe5R-005UkZ-1g@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add pg_assume(expr) macro
This macro can be used to avoid compiler warnings, particularly when using -O3
and not using assertions, and to get the compiler to generate better code.
A subsequent commit introduces a first user.
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/3prdb6hkep3duglhsujrn52bkvnlkvhc54fzvph2emrsm4vodl@77yy6j4hkemb
Discussion: https://postgr.es/m/20230316172818.x6375uvheom3ibt2%40awork3.anarazel.de
Discussion: https://postgr.es/m/20240207203138.sknifhlppdtgtxnk%40awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d65eb5b1b84e9104144b6b07b526bc73e819d6d7
Modified Files
--------------
src/include/c.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-07-10 01:13:16 | pgsql: injection_points: Add injection_points_list() |
| Previous Message | Tom Lane | 2025-07-09 18:21:16 | pgsql: Link libpq with libdl if the platform needs that. |