https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93491
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Wed, 29 Jan 2020, pinskia at gcc dot gnu.org wrote: > Const functions by definition dont trap or throw. So adding const to a > function that traps makes the testcase undefined. It's not clear to me if the definition of const means const for all possible arguments as opposed to const for arguments actually passed when the program is executed in the abstract machine (see what I said in bug 19828 comment 12).