On Tue, 12 Dec 2023 09:39:58 +0100 David Brown via Gcc <gcc@gcc.gnu.org> wrote:
> If you have fixed the immediate problems in the code, add the > "-fsanitize=undefined" flag before running it. That will do run-time > undefined behaviour checks. I would like to understand that better, for reasons you might guess. -fsanitize is described under Program Instrumentation Options, but much of the terminology seems to C, and some of the options are documented to work only with C or C++. If it applies to the generated code irrespective of the front-end, then could the options be described in terms of Generic? For example, signed-integer-overflow, bounds, and bounds-strict would seem to be useful in any language that defines integers and arrays. I also wonder if "integer" includes _Float128. "-fsanitize" appears only once in the Internals document, under bool TARGET_MEMTAG_CAN_TAG_ADDRESSES If I knew when contructs were needed for particular options to work, I could add them to the documentation. --jkl