[PATCH] Have HasSideEffects() return false for __attribute__((const)) functions

Richard Smith richard at metafoo.co.uk
Sun Apr 5 12:02:52 PDT 2015


Can we also do this for `__attribute__((pure))`? The only difference is whether the function is permitted to read globals, which is usually not a side-effect. I'm not sure whether a `pure` function is permitted to read volatile globals, though...


http://reviews.llvm.org/D8548

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list