fix: include <cstdint> where fixed-width int types are used#4
Merged
Conversation
Headers that use uint64_t and friends relied on transitive includes that newer libstdc++ (GCC 13+) no longer provides, causing build failures such as "'uint64_t' has not been declared" and the cascade of abstract-class / override mismatch errors that follow from the implicit int fallback. Add explicit <cstdint> includes to each affected header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
edge.u/edge.v are SegID (uint64_t) while maxId was std::size_t. On Linux
these are the same underlying type so std::max deduces fine, but on
macOS uint64_t is unsigned long long and size_t is unsigned long, so
template argument deduction fails ("deduced conflicting types"). Declare
maxId as SegID so both std::max operands share a 64-bit type on every
platform, avoiding both the deduction failure and any narrowing of seg
ids toward a possibly-32-bit size_t.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9808416 to
aa08afa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Building
waterzwith a recent toolchain (observed with GCC 15 / cpython-3.13) fails at compile time:…followed by a cascade of
invalid new-expression of abstract class typeandmarked 'override', but does not overrideerrors. Those are all downstream effects: withuint64_tundeclared, the baseConstraintProvidermethods are parsed with an implicitintfallback, so theuint64_t-typed overrides in the subclasses (SemanticConstraintProvider,SemanticTaintConstraintProvider,SegConstraintProvider,SizeHeuristicConstraintProvider) no longer match the base signatures.Root cause
The affected headers use
uint64_t/int*_twithout including<cstdint>. They previously compiled by relying on transitive includes that newer libstdc++ (GCC 13+) no longer provides.Fix
Add explicit
#include <cstdint>to each header that names fixed-width integer types:backend/ConstraintProvider.hppbackend/DefaultDict.hppbackend/SemanticConstraintProvider.hppbackend/evaluate.hppbackend/types.hppfrontend_agglomerate.hfrontend_evaluate.hVerification
pip wheel . --no-depsnow builds successfully with GCC 15 / Python 3.13:🤖 Generated with Claude Code