Is this code UB or not?
__attribute__((const)) const char* foo() {
static const char* str = "yo bro";
return str;
}
__attribute__((pure)) const char* bar() {
static const char* str = "ey mate";
return str;
}
I'm in particular interested in how pure/const work together with the str declaration.