This is the mail archive of the gcc-patches@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] | |
Before the visibility changes for anon namespaces if a static data member wasn't defined (just declared), but used, there would be a link time failure. But as constrain_visibility (decl, VISIBILITY_ANON) makes now the static data members !TREE_PUBLIC and DECL_NOR_REALLY_EXTERN, even when they are not defined g++ emits them in .bss.
I'm not sure whether the && DECL_INITIAL (decl) == NULL_TREE should be there, given that [class.static.data]/4 says that the definition should be present even for const qualified static data members with initializers in the class, but removing that line breaks a bunch of testcases in the testsuite.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |