Re: A better __builtin_constant_p

2019-07-01 Thread Andrew Sutton
> Am I totally on the wrong track here? That depends on what you want your assumptions to do. This definitely doesn't solve the problems I'm having implementing C++ contracts, especially axioms, which can involve declarations of undecidable functions. For example, is_reachable(p, q) for a pair of

A better __builtin_constant_p

2019-06-30 Thread Pip Cet
I'd like to introduce a new builtin, __builtin_constant_function_p, with nicer semantics and better performance than __builtin_constant_p. Background: I want to define an assert_or_assume() macro that is equivalent to assume() or assert(), whichever results in better compiled code. I'd like to