This is the mail archive of the gcc@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] Fix PR c/6343 (was: Re: GCC 3.1 Prerelease)


+  if ((! DECL_WEAK (newdecl) && ! DECL_WEAK (olddecl))
+      || (DECL_WEAK (newdecl) && DECL_WEAK (olddecl)))
+    return;
+

Just:

  if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl))
    return;

seems easier to read to me.

+    warning_with_decl (decl, "applying #pragma weak `%s' after first use 
may result in unspecified behaviour");
+

Just say "results in unspecified behavior" or even "is invalid".  There's
no reason to be so cautious; either the construct is legal or it isn't.

OK for mainline and branch with these changes.

Thanks for working so hard on this!

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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