This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [expr-cumulative] RFA fix PR 9708


Keith> One question: should one be able to print the value of this static
Keith> OUTSIDE the specific block in which it is defined? "print
Keith> K::m::themagicstatic"?

It would have to be some other syntax, because this is valid:

    struct K {
      int m () {
        static bool themagicstatic = false;

        return themagicstatic ? 23 : 24;
      }

      class m {
        static bool themagicstatic;
      };
    };


... and K::m::themagicstatic unambiguously refers to the member of
class m.

I thought about trying to make K::m()::themagicstatic work, but that
also seems like a pain.

Keith> This would almost certainly be a contrivance on our part for the sake
Keith> of debugging, but it seems a reasonable thing to be able to do.

I agree.  I think it is a separate problem, though, because it would be
nice to also make it work for C, where there is no demangled form, etc.
Maybe if we ever get "HPD-like" in our symbol naming, or something like
that.

Keith> In any case, I don't have a problem with your patch.

Thanks, I'll commit shortly.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]