Move -ffast-math defense to float.c and remove the configure check.
Tom Lane <tgl@sss.pgh.pa.us>
Move -ffast-math defense to float.c and remove the configure check. We had defenses against -ffast-math in timestamp-related files, which is a pretty obsolete place for them since we've not supported floating-point timestamps in a long time. Remove those and instead put one in float.c, which is still broken by using this switch. Add some commentary to put more color on why it's a bad idea. Also remove the check from configure. That was just there to fail faster, but it doesn't really seem necessary anymore, and besides we have no corresponding check in meson.build. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Suggested-by: Andres Freund <andres@anarazel.de> Suggested-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/abFXfKC8zR0Oclon%40ip-10-97-1-34.eu-west-3.compute.internal
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +0 −23 |
| configure.ac | modified | +0 −7 |
| src/backend/utils/adt/date.c | modified | +0 −8 |
| src/backend/utils/adt/float.c | modified | +17 −0 |
| src/backend/utils/adt/timestamp.c | modified | +0 −7 |
| src/interfaces/ecpg/pgtypeslib/interval.c | modified | +0 −4 |
| src/interfaces/ecpg/pgtypeslib/timestamp.c | modified | +0 −4 |
Discussion
- Defend against -ffast-math in meson builds 18 messages · 2026-03-11 → 2026-03-15