This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- From: Jeff Law <law at redhat dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Oct 2013 13:39:54 -0600
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [5/25] Tree and gimple ifaces
- Authentication-results: sourceware.org; auth=none
- References: <20131021122236 dot GE37888 at msticlxl57 dot ims dot intel dot com> <20131024144329 dot GB39638 at msticlxl57 dot ims dot intel dot com>
On 10/24/13 08:43, Ilya Enkovich wrote:
"number of arguments" seems wrong. Aren't you counting the number of
arguments without bounds?
+/* Return the number of arguments used by call statement GS. */
+static inline unsigned
+gimple_call_num_nobnd_args (const_gimple gs)
+ unsigned num_args = gimple_call_num_args (gs);
+ unsigned res = num_args;
+ for (unsigned n = 0; n < num_args; n++)
+ if (POINTER_BOUNDS_P (gimple_call_arg (gs, n)))
+ return res;
+/* Nonzero if this type supposes bounds existence. */
+#define BOUNDED_TYPE_P(type) \
+ (TREE_CODE (type) == POINTER_TYPE \
+ || TREE_CODE (type) == REFERENCE_TYPE)
So how is this different than POINTER_TYPE_P?
If you really want BOUNDED_TYPE_P, perhaps define it in terms of
With that and the comment fix, this is fine.