This is the mail archive of the gcc-patches@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] |
On Thursday 18 April 2002 19:44, Richard Henderson wrote: > On Thu, Apr 18, 2002 at 10:29:47AM +0200, Franz Sirl wrote: > > Even that didn't cover all cases IIRC. If someone would come up with some > > testcases specifying the desired semantics of attribute((weak)) vs. > > #pragma weak vs. declaration vs. definition, I'm willing to work on it > > again. > > Quite simple: attributes are sticky, and #pragma is a funny name > for an attribute. Hehe, when it's so simple, then why there is no warning/error for 8 of 21 cases below, leading to potential miscompilation due to the missing SYMBOL_REF_WEAK (/i in RTL) flag? And these testcases are just a quick summary I cobbled together in 5 min, there may be more cases out there. Only case 3a (with the currently commented out #pragma weak) gives an error. BTW, does the dg testsuite have something like "scan-rtl-not rtl/-dr symbol_ref:" to scan for a naked SYMBOL_REF? Franz.
Attachment:
weak.c
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |