#define _DETECTOR_BIT constants, ignore -Wstringop-overflow warnings
Description
-
lal/lib/tools/LALDetectors.h
:#define
the_DETECTOR_BIT
constants instead of usingenum
-
enum
is alwaysint
(until C23/C++11) soLAL_ET*_DETECTOR_BIT
constants overflow. - SWIG never did parse
_DETECTOR_BIT
definition correctly; silently ignored until v4.2.0.
-
- Revert
lal: pin swig < 4.2.0
- This reverts commit 148dc548.
- Revert
lalframe: pin swig < 4.2.0
- This reverts commit b29db69e.
- Revert
lalmetaio: pin swig < 4.2.0
- This reverts commit 12e59647.
- Revert
lalsimulation: pin swig < 4.2.0
- This reverts commit 444e7812.
- Revert
lalburst: pin swig < 4.2.0
- This reverts commit e6bb4059.
- Revert
lalinspiral: pin swig < 4.2.0
- This reverts commit 976e1e9c.
- Revert
lalinference: pin swig < 4.2.0
- This reverts commit 1d86b7e5.
- Revert
lalpulsar: pin swig < 4.2.0
- This reverts commit 79fe5ddd.
- Revert
pin swig in common conda environment setup
- This reverts commit 1f9810a8.
-
gnuscripts/lalsuite_swig.m4
: ignore-Wstringop-overflow
warnings in wrapper code- SWIG wrapper code does some funky casting, which is correct, but confuses the warnings.
-
lal/lib/tools/LALDetectors.h
: assign type name to enumeration of detectors -
lal/lib/tools/LALDetectors.h
: add inline SWIG function to compute detector DQ bits
API Changes and Justification
Backwards Compatible Changes
-
This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions -
This change adds new classes/functions/structs/types to a public C header file or Python module
enum
s aren't compiled into shared libraries, so changing the _DETECTOR_BIT
constants from an enum
to a #define
is not an API/ABI change. It does, however, remove those constants from the SWIG interface, so it a backward-incompatible change to the SWIGLAL API. Those constants were never guaranteed to be defined correctly, however, and hopefully no one has been using them from SWIG.
Backwards Incompatible Changes
-
This change modifies an existing class/function/struct/type definition in a public C header file or Python module -
This change removes an existing class/function/struct/type from a public C header file or Python module
Review Status
Closes #725 (closed)
Requires #728 (closed)
Edited by Karl Wette