gcc 7.5.0 does not understand __attribute__((no_sanitize("undefined")) I moved the usage of this attribute from sql/set_var.h to include/my_attribute.h and created a macro for it depending on compiler used.