This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] Mini bunch of mini clean-ups
On 04/01/2013 06:50 PM, Jason Merrill wrote:
Honestly, I don't know, I followed DECL_TYPE_TEMPLATE_P, I can see what
happens if I remove it...
On 04/01/2013 12:41 PM, Paolo Carlini wrote:
Do we need the NULL_TREE check? That is, do we still build a template
with no result?
+#define DECL_FUNCTION_TEMPLATE_P(NODE) \
+ (TREE_CODE (NODE) == TEMPLATE_DECL \
+ && DECL_TEMPLATE_RESULT (NODE) != NULL_TREE \
Ok, the subtlety wasn't clean to me looking at the other predicates and
the comment. Let's leave it alone for now.
PS: In my opinion we should also rename DECL_FUNCTION_MEMBER_P to
The current name makes it clearer (to me, anyway) that the macro
assumes that we already know we're looking at a FUNCTION_DECL.