On 17/12/2005, at 10:08 AM, Jakub Jelinek wrote:
But there are dozens of other uses of TREE_PUBLIC in the backends, soit wouldn't surprise me if something similar is not present on other arches.Normal aliases are usually declared through extern __typeof (foo) bar __attribute__((alias ("foo")));eventhough the alias really is defined in that file, so I don't see whyweakref aliases couldn't be declared the same way.
In ISO C, 'extern' does not mean 'not defined in this file', it means 'visible outside this file'. For instance,
extern int x(void) { return 1; } extern int i3 = 3;are both valid ISO C, although they're unusual and the compiler warns about the second one.
The reason you can't define weakref aliases 'the same way' is because the functionality doesn't exist; there is no way to define a weakref which is visible outside the file it's defined in, the object file format doesn't support it.
smime.p7s
Description: S/MIME cryptographic signature