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]

Re: [patch] record extern weak decls in assemble_external


On Thu, Jul 24, 2008 at 10:44, Rafael Espindola <espindola@google.com> wrote:

> 2008-07-24  Rafael Espindola  <espindola@google.com>
>
>        * varasm.c (weak_decls): Move earlier in the file.
>        (assemble_external): Add weak decls to the weak_decls list.
>        (declare_weak): Don't add decls to the weak_decls list.

You have changed the meaning of the predicate in a confusing way.  The
original code did:

-  else if (SUPPORTS_WEAK)
-    {
-      if (! DECL_WEAK (decl))
-	weak_decls = tree_cons (NULL, decl, weak_decls);
-    }

The new version does:

+  if (SUPPORTS_WEAK && DECL_WEAK (decl))
+    weak_decls = tree_cons (NULL, decl, weak_decls);

It seems as if the old version was wrong, it would only add non-weak
DECLs to the list.  But if so, how did it use to work?


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]