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++ RFC/Patch] PR 39813


On 04/28/2015 08:54 AM, Paolo Carlini wrote:
Hi,

On 04/28/2015 02:45 PM, Jason Merrill wrote:
On 04/28/2015 06:59 AM, Paolo Carlini wrote:
       && !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (t)
the name
of the macro seems weird to me: it mentions friends (and friends are
mentioned in its comment too) but isn't used only for DECL_FRIEND_P true
and indeed it is true for the non-friend 'fn' in the snippet at issue).

It shouldn't be true for fn, that's a bug.
Ok, but then what? Its definition boils down to very basic macros:

#define DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION(DECL) \
   (DECL_TEMPLATE_INFO (DECL) && !DECL_USE_TEMPLATE (DECL))

It could be only matter of adding a DECL_FRIEND_P check at the beginning?

Sure, that sounds likely.

Jason


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