You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first one is used by flang1, and the second is used by flang2. It seems that plan was to reuse the code between flang1 and flang2, but that effort was abandoned half-way through. It would be nice to unify these implementations.
Both of these implementations suffer require type casts on arguments to their APIs. Specifically, hash_key_t and hash_data_t are typedef-ed to const void *, and throughout the code base these casts often have to add or drop the const qualifier, resulting in -Wcast-qual warnings, which turn into compile-time errors when -Werror is enabled. #1073 avoided these warnings with diagnostic pragmas, but ideally the APIs could be rewritten to avoid dropping the const qualifier, or at least to reduce the number of places where pragmas are needed.
The text was updated successfully, but these errors were encountered:
Classic Flang contains two implementations of hashset and hashmap that are almost identical:
The first one is used by flang1, and the second is used by flang2. It seems that plan was to reuse the code between flang1 and flang2, but that effort was abandoned half-way through. It would be nice to unify these implementations.
Both of these implementations suffer require type casts on arguments to their APIs. Specifically,
hash_key_t
andhash_data_t
are typedef-ed toconst void *
, and throughout the code base these casts often have to add or drop theconst
qualifier, resulting in-Wcast-qual
warnings, which turn into compile-time errors when-Werror
is enabled. #1073 avoided these warnings with diagnostic pragmas, but ideally the APIs could be rewritten to avoid dropping theconst
qualifier, or at least to reduce the number of places where pragmas are needed.The text was updated successfully, but these errors were encountered: