Skip to content

Conversation

nijtmans
Copy link

@nijtmans nijtmans commented Oct 2, 2025

Recently, Tcl 9.1 (still in development) started to include utf8proc for doing its Unicode character conversions. Since Tcl is normally built with the option -Wc++-compat, this produces a lot of compiler warnings.

This resulted in the following bug report to Tcl:
https://core.tcl-lang.org/tcl/tktview/9e4c412f64

The cause of this warnings are that in C++ any operation (like '|') on an enum (like utf8proc_option_t) converts the type to an integer, which then cannot be used as an enum. This can be handled by an additional typecast, converting the integer back to the expected utf8proc_option_t.

It's unfortunate that C++ operates this way, and clang 21 (among others) warns for this with the option -Wc++-compat

Those proposed changes eliminate the warnings, and add a -Wc++-compat option in the Makefile

@eschnett
Copy link
Collaborator

eschnett commented Oct 2, 2025

More warnings is good, and the respective necessary boilerplate is limited. LGTM.

@nijtmans
Copy link
Author

More warnings is good, and the respective necessary boilerplate is limited. LGTM.

Thanks @eschnett. So who has the authority to decide that this can be merged? And who can merge it?

Anything more that needs to be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants