Jan Hubicka <hubi...@ucw.cz> writes: >> >> OK. I wonder if we can/should carve off some bits to note >> type_with_linkage_p and type_in_anonymous_namespace_p in the tree >> itself? At least in type_common there's plenty of bits left. >> Not sure how expensive / reliable (non-C++?) those tests otherwise are. > > It also makes me wonder if other languages (D, Ada, go, Fortran...) have > concept of anonymous namespace types - that is types that are never > interoperable with types from another translation unit. That would > justify the extra flag pretty well. > > Similarly for types with name mangling defined. Both these bits can be > made indpendent of C++.
Go has the concept, but it implements it by mangling the names with the package-path, which is required to be unique within an application (the package-path is normally the path used to find an import, so it is inherently unique within a file system). Ian