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: [C++ Patch] PR 51290


On 11/24/2011 03:58 AM, Jason Merrill wrote:
On 11/23/2011 08:09 PM, Paolo Carlini wrote:
   if (null_test)
     {
-      tree zero = cp_convert (TREE_TYPE (expr), integer_zero_node);
+      tree zero = cp_convert (TREE_TYPE (expr),
+                  want_pointer ? nullptr_node : integer_zero_node);

This ?: is unnecessary; if null_test is true, so is want_pointer.


OK just using nullptr_node.
Thanks, yesterday was a bit tired and didn't noticed the trick with null_test set to error_mark_node a few lines before. Applied.

Paolo.


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