This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: fix gcc.dg/torture/builtin-noret-2.c for sh-elf
Zack Weinberg wrote:
> Hrm. The #pragma is recognized if HANDLE_SYSV_PRAGMA, one of the
> ASM_WEAKEN_* macros, and SUPPORTS_WEAK are all set. This strikes me
> as silly. We should recognize #pragma weak whenever weak symbols are
> meaningful. Would you be willing to prepare a patch to that effect?
That was trivial. If SUPPORTS_WEAK is not defined by the target, it is
defined in defaults.h, with a value depending on wheather one of
ASM_WEAKEN_LABEL / ASM_WEAKEN_DECL is defined.
But will this do the right thing if only ASM_WEAKEN_LABEL is defined, but
not ASM_WEAKEN_ALIAS?
And what about testing? Would this have to be tested on all targets?
>
> Another note on your original patch: whatever ends up being done, I
> think _Exit needs the same treatment.
Do we have targets where this is indicated?
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-05-23 J"orn Rennecke <joern.rennecke@superh.com>
* c-pragma.h (HANDLE_PRAGMA_WEAK): Always define to SUPPORTS_WEAK.
Index: c-pragma.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-pragma.h,v
retrieving revision 1.33
diff -p -r1.33 c-pragma.h
*** c-pragma.h 28 Jan 2003 23:26:25 -0000 1.33
--- c-pragma.h 23 May 2003 11:17:09 -0000
*************** extern int yydebug;
*** 28,38 ****
extern struct cpp_reader* parse_in;
- #ifdef HANDLE_SYSV_PRAGMA
- #if ((defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_WEAK_ALIAS)) \
- || defined (ASM_WEAKEN_DECL))
#define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK
- #endif
/* We always support #pragma pack for SYSV pragmas. */
#ifndef HANDLE_PRAGMA_PACK
--- 28,34 ----