this_object() in constants

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1858

Reported by Martin Stjernholm mast@roxen.com

Consider:

    constant foo = ({this_object()});

    int main()
    {
      werror ("%O %O\n", foo, foo[0] == this_object());
    }

This prints "({0})" in 7.2 and later. I expected either an error due to a nonconstant expression used in constant, or, if it somehow works anyway, an array with this_object() in it.

Interestingly enough, the array contains an object in 7.0, but it's not the same as this_object().