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] Fix PR C++/18984


Andrew Pinski wrote:

On Dec 21, 2004, at 2:53 PM, Mark Mitchell wrote:


Andrew Pinski wrote:

+    *stmt_p = build2 (CLEANUP_EH_ONLY (stmt) ? TRY_CATCH_EXPR
+                         : TRY_FINALLY_EXPR,
+              void_type_node,
+              CLEANUP_BODY (stmt),
+              CLEANUP_EXPR (stmt));
+
+  pointer_set_insert (p_set, *stmt_p);


This looks like you are building a TRY_CATCH or TRY_FINALLY expression around every expression that is niether an ADDR_EXPR, RETURN_EXPR, type, or declaration. That seems very wasteful.


The code was like this before, I am only changing where we call
poiner_set_insert and nothing else.

That doesn't make sense. If STMT is not a CLEANUP_STMT, then using CLEANUP_BODY isn't correct.


+   Collisions are resolved by linear probing.  More complicated
+   collision management schemes are only useful when the load factor
+   significantly exceeds 0.5, and we never let that happen.  */


This second part of the comment is inappropriate.


This comment was there before, I am just adding back what was there
before the function was removed because it was unused.

Fine -- but it's still in appropriate, and you should remove it when you add the function back.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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