This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

existing functionality questions


Hello,

I am trying to find out what the existing method of determining whether or not something (function for example) can access a field of a structure. For example:

class A {
  public:
    int pub_var;

void foo(/*implicit this* */) {...}

  private:
    int private_var;
};

void bar(A a) {...}

In this example, foo can obviously access private_var but bar cannot. When examining function arguments, what is the accepted practice for finding out what members the function may access in the structure.

Thanks in advance,
Mike Tegtmeyer


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