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]

Re: TRANSLATION_UNIT_DECL breaks bootstrap





whereas the "true" globals are clobbered on any call anywhere.
To do this, we need to distinguish between those variables local to a
file, and those that aren't.
HAS_FILE_SCOPE_P would do this.

This all seems like it needs to be a langhook.

No, we aren't doing this on language specific trees, no langhook should be necessary or is wanted.


 How does this work in
C++, to handle (for instance) private static variables in classes?

It works just fine.


  Do
you look at DECL_CONTEXT for that?

Right now, we aren't field based (IE accesses to a field of a variable are globbed to the entire variable), to avoid dealing with this. We also only care about accesses to variables, not the type of these variables.
It wouldn't be helpful for us to deal with it anyway, since TBAA already does.


How do you cope with friend
classes and subclasses?
friend classes wouldn't matter, even if we were field based.
You seem to think types of variables matter in a points-to analysis, and they simply don't.
Ignore the types, and you'll realize a whole class of problems go away.



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