This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/6569: sparc-sun-solaris2.7 C testsuite regression incompile/20011119-2.c
I understand the problem and I think I know how to fix it, but I have a
question:
Is code like this supposed to be valid?
extern void * ffoo1c (void);
void * foo1c (void)
{
return (void *)ffoo1c;
}
extern void * ffoo1c (void) __attribute__((weak));
If so, why do we have a warning in declare_weak that says:
"weak declaration must precede definition"
? This would seem to be exactly that case.
My patch causes us to issue that error, causing some of weak-*.c tests
to fail.
Something is wrong: either the error message or the test. Which one?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com