4 ms·
Don't we already have that to some degree in GNU C? gcc has an __attribute__((pure)) (not sure if it enforces it though) and there are C++ constexprs.
by nn3 8y ago
Don't we already have that to some degree in GNU C?
gcc has an __attribute__((pure)) (not sure if it enforces it though) and there are C++ constexprs.
- np_tedious 7y agoI think it's a compiler hint for optimizations, but the onus of correctness (ie. Is this really pure) remains on the programmer / whatever generates the C code