This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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.
Attachment:
gcc-weaksym-9x2.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |