On Tuesday 23 April 2002 20:04, Richard Henderson wrote: > On Tue, Apr 23, 2002 at 07:28:22PM +0200, Franz Sirl wrote: > > What do you all think about this patch? It covers all the cases I could > > think of, but maybe I missed something. > > I don't see why functions should be singled out in having to have > the weakening before the definition. Hmm, I didn't want to get too aggressive in here (declare_weak wasn't called for VAR_DECLs before) and judging from the comments in tree.h it looks like TREE_ASM_WRITTEN has a slightly different meaning for a VAR_DECL. But if you think it's OK, I'll happily change it. Looking at the warnings in glibc it turned out I was already too aggressive, the patch would warn for: extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr); extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group); extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtod_internal (__nptr, __endptr, 0); } extern __inline double atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } double __attribute__ ((weak)) strtod (nptr, endptr) const char *nptr; char **endptr; { return __strtod_internal (nptr, endptr, 0 ); } I don't think we want a warning here for strtod? Appended an updated patch with Jason's suggestions integrated as well. I'll run a few more tests tomorrow. Franz.