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] Canonical function and method types


Doug Gregor wrote:
> This patch implements canonical types for FUNCTION_TYPE and
> METHOD_TYPE nodes, which previously were always marked as requiring
> structural type-checks. 

Good stuff.

This isn't 100% clear:

+   ANY_STRUCTURAL_P points to a boolean that states whether any of the
+   other types that work with ARGTYPES (e.g., the return type of the
+   function) are structural. *ANY_STRUCTURAL_P will be set TRUE if any
+   of those types or any of the argument types in ARGTYPES are
+   structural.

In particular, it doesn't obviously say if the parameter must be set on
entry.

/* Upon return, *ANY_STRUCTURAL_P will be true iff either it was true
   on entry to this function, or if any of the ARGTYPES are structural.  */

That explains how this function works, without pulling other stuff into
the mix.

OK with that change (and the similar change to ANY_NONCANONICAL_P.)

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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