------- Comment #8 from mmitchel at gcc dot gnu dot org 2006-07-19 00:45 ------- This is certainly a serious problem.
Right now, the C++ front end relies on TREE_PUBLIC in various places to determine whether or not something has external linkage. Instead, we could compute that, by looking at the scope of the entity. In fact, we already have a function (decl_linkage) that computes linkage. That function needs adjusting, in view of Jason's change; instead of checking TREE_PUBLIC, it should check DECL_NAMESPACE_SCOPE_P. And, everything in the C++ front end that cares about linkage needs to change to use DECL_EXTERNAL_LINKAGE_P, rather than checking TREE_PUBLIC. It looks like convert_nontype_argument already does use DECL_EXTERNAL_LINKAGE_P. So, this bug can probably be fixed by simply adjusting decl_linkage as above. -- mmitchel at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28407