[cfe-users] Constexpr prevents optimization?

2018-02-16 Thread Steffen Hirschmann via cfe-users
Dear all, I was just playing around with a toy example when I noticed an oddity in the code generated by clang-5.0.0 (and also in clang-5.0.1) regarding constexpr. Given the code: > int fib(int i) { if (i <= 0) return i; else return (fib(i - 1) + fib(i - 2)) > % 100; } > int main() > { > int

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Steffen Hirschmann via cfe-users
On 13:22 Fri 13 Apr , Rick Mann via cfe-users wrote: > I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? Just have a look at a minimal example on godbolt: https://godbolt.org/g/MRjGG3 Indeed the function call gets resolved at compile time. But that does not mean that o