Skip to content

Avoid old-style casts - #405

Merged
lemire merged 1 commit into
mainfrom
old-style-cast
Aug 20, 2026
Merged

Avoid old-style casts#405
lemire merged 1 commit into
mainfrom
old-style-cast

Conversation

@lemire

@lemire lemire commented Aug 20, 2026

Copy link
Copy Markdown
Member

Replace C-style casts with static_cast/const_cast so -Wold-style-cast is clean.

Unix test targets now compile with -Wold-style-cast (already under -Werror). The amalgamated-header CI job also builds string_test.cpp with -Werror=old-style-cast.

This is the same class of warning that currently breaks simdjson's checkperf job when it vendors fast_float.h.

Replace C-style casts with static_cast/const_cast so -Wold-style-cast
is clean, and enable that warning in the Unix test builds and the
amalgamated-header CI job.
@lemire
lemire merged commit a8a02f7 into main Aug 20, 2026
53 of 66 checks passed
lemire added a commit to simdjson/simdjson that referenced this pull request Aug 20, 2026
Re-vendor the amalgamated header from fastfloat/fast_float#405 so the
checkperf job's -Werror=old-style-cast build succeeds. The vendor
script now also accepts --from-file for an amalgamated header that is
not yet a GitHub release.
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.

1 participant