target/6569: sparc-sun-solaris2.7 C testsuite regression in compile/20011119-2.c

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Tue May 7 10:24:00 GMT 2002


At 19:05 07.05.2002, Mark Mitchell wrote:
>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?

No answers, but I have a solution now, look at how I handle WEAK_EMITTED in 
the appended patch.

Please comment.

This is just a very raw version right now, I haven't 
bootstrapped/minimized/nicefied etc. it yet.

Franz.
  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-weaksym-9x2.patch
Type: application/octet-stream
Size: 3788 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20020507/d24f7bbf/attachment.obj>


More information about the Gcc-bugs mailing list