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
jos...@codesourcery.com

Reply via email to