From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id C7A623858C78 for ; Wed, 6 Sep 2023 21:00:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C7A623858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.02,233,1688457600"; d="scan'208";a="16291811" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 06 Sep 2023 12:59:59 -0800 IronPort-SDR: R+whhodLK5bUDwiR+UMnmM3EUXXRLgXITqmXIzdQvL1WmHvHQTp/rwoG4lEwjgCywH6A5Zdhyh nVXefbB8+1NlSrInXy+Q/5eQf86o8fQP0+Glk4mH+Ed1jOxzltLq1m6VL2AZT9fAP6Qz5LKKQU CysFvv6elhFl2dJqyhCpM0Q35qhIoEjx2AySeRgpwNeyISL/H42SQA0byVXXoOwPcvwR/VTAlI 2qwb/d0RANmT/dUQNtGGdV7BAXkMC1Dj4e17aD7Eqe5nzAeB06YFS06JmQPYJn1GomhxG6EGkb GTE= Date: Wed, 6 Sep 2023 20:59:55 +0000 From: Joseph Myers To: Martin Uecker CC: Subject: Re: [C PATCH 1/6] c: reorganize recursive type checking In-Reply-To: <1df29de95ff41a02ffd218f4cd69f8f93df35321.camel@tugraz.at> Message-ID: References: <4b3866a8cc9b48f3be97c004dedbac8e9149da63.camel@tugraz.at> <1df29de95ff41a02ffd218f4cd69f8f93df35321.camel@tugraz.at> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3104.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 26 Aug 2023, Martin Uecker via Gcc-patches wrote: > -static int > +static bool > comp_target_types (location_t location, tree ttl, tree ttr) The comment above this function should be updated to refer to returning true, not to returning 1. And other comments on common_pointer_type and inside that function should be updated to refer to comp_target_types returning true, not nonzero. > @@ -1395,17 +1382,13 @@ free_all_tagged_tu_seen_up_to (const struct tagged_tu_seen_cache *tu_til) > > /* Return 1 if two 'struct', 'union', or 'enum' types T1 and T2 are > compatible. If the two types are not the same (which has been > - checked earlier), this can only happen when multiple translation > - units are being compiled. See C99 6.2.7 paragraph 1 for the exact > - rules. ENUM_AND_INT_P and DIFFERENT_TYPES_P are as in > - comptypes_internal. */ > + checked earlier). */ > > -static int > +static bool > tagged_types_tu_compatible_p (const_tree t1, const_tree t2, > - bool *enum_and_int_p, bool *different_types_p) > + struct comptypes_data* data) Similarly, this comment should be updated for the new return type. Also the GNU style is "struct comptypes_data *data" with space before not after '*'. > @@ -1631,9 +1603,9 @@ tagged_types_tu_compatible_p (const_tree t1, const_tree t2, > Otherwise, the argument types must match. > ENUM_AND_INT_P and DIFFERENT_TYPES_P are as in comptypes_internal. */ > > -static int > +static bool > function_types_compatible_p (const_tree f1, const_tree f2, > - bool *enum_and_int_p, bool *different_types_p) > + struct comptypes_data *data) Another comment to update for a changed return type. > /* Check two lists of types for compatibility, returning 0 for > - incompatible, 1 for compatible, or 2 for compatible with > - warning. ENUM_AND_INT_P and DIFFERENT_TYPES_P are as in > - comptypes_internal. */ > + incompatible, 1 for compatible. ENUM_AND_INT_P and > + DIFFERENT_TYPES_P are as in comptypes_internal. */ > > -static int > +static bool > type_lists_compatible_p (const_tree args1, const_tree args2, > - bool *enum_and_int_p, bool *different_types_p) > + struct comptypes_data *data) This one also needs updating to remove references to parameters that no longer exist. -- Joseph S. Myers joseph@codesourcery.com