Commit d7001ae5 by Geoffrey Keating Committed by Geoffrey Keating

darwin.c (darwin_handle_weak_import_attribute): Permit VAR_DECLs to have weak_import attribute.

2005-01-03  Geoffrey Keating  <geoffk@apple.com>

	* config/darwin.c (darwin_handle_weak_import_attribute): Permit
	VAR_DECLs to have weak_import attribute.

Index: testsuite/ChangeLog
2005-01-03  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/darwin-weakimport-1.c: Remove check for variables
	producing warning.
	* gcc.dg/darwin-weakimport-2.c: New.

From-SVN: r92871
parent a035080c
2005-01-03 Geoffrey Keating <geoffk@apple.com>
* config/darwin.c (darwin_handle_weak_import_attribute): Permit
VAR_DECLs to have weak_import attribute.
* config/rs6000/darwin-fallback.c: Use 'ucontext_t' rather than
'struct ucontext'.
......
......@@ -1228,7 +1228,7 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
int ARG_UNUSED (flags),
bool * no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
{
warning ("%qs attribute ignored", IDENTIFIER_POINTER (name));
*no_add_attrs = true;
......
2005-01-03 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-weakimport-1.c: Remove check for variables
producing warning.
* gcc.dg/darwin-weakimport-2.c: New.
2005-01-03 Richard Henderson <rth@redhat.com>
* g++.old-deja/g++.ext/attrib5.C: Move the alias after the referent.
......
......@@ -12,5 +12,3 @@ void b(void)
{
a();
}
extern int c __attribute__((weak_import)); /* { dg-warning "ignored" } */
/* APPLE LOCAL file put in 4.1 */
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-require-weak "" } */
/* { dg-final { scan-assembler "weak_reference _foo" } } */
extern int foo __attribute__((weak_import));
int main(void)
{
if (&foo)
return foo;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment