This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/86842] Allow run-time checks of pre- and postconditions


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86842

--- Comment #4 from fiesh at zefix dot tv ---
> So I'm strongly opposed to that part of the suggestion. Either you get all the ABI-preserving debug checks, or none.

Checking all (possible) preconditions without any limit on the introduced
complexity might not be possible within reasonable time.  Checking transitivity
naively is O(N^3).  Maybe there's a better way to check something is a strict
weak ordering, but in general there might always be a sentence whose veracity
cannot be established more efficiently.

So if the library wanted to provide checks for every precondition that can be
verified (which was my original proposition), I don't see how it's possible
meaningfully without any restriction on the computational efforts spent.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]