Skip to content

Fixed a compile error in AtomicRefCounted tests#306

Merged
pasin merged 2 commits into
release/4.1from
fix/another-atomic-ref-build-error
Jun 18, 2026
Merged

Fixed a compile error in AtomicRefCounted tests#306
pasin merged 2 commits into
release/4.1from
fix/another-atomic-ref-build-error

Conversation

@snej

@snej snej commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

In LiteCore PR couchbase/couchbase-lite-core#2503 the Ubuntu build failed with a GCC error building Fleece tests, in

couchbase-lite-core/vendor/fleece/Tests/SupportTests.cc:476:15: error: alias template 'AtomicRef' requires template arguments; argument deduction only allowed for class templates
  476 |     AtomicRef r = new AtomicRetainedTest();

This is a regression introduced by #272 / #303 but it wasn't caught in Fleece's CI, apparently because Fleece's CI builds with GCC on Ubuntu, while LiteCore builds with Clang; and probably a different Clang than Fleece uses on macOS since it didn't get this error either.

@snej snej requested review from borrrden and pasin June 18, 2026 17:09

@pasin pasin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a failure on Android (32 bits) in PR validation done by Jenkins, here.

[2026-06-17T19:36:53.163Z] /home/couchbase/jenkins/workspace/line_couchbase-lite-core_PR-2503/couchbase-lite-core/vendor/fleece/Fleece/Support/RefCounted.cc:139:36: error: constexpr variable 'kBusyMask' must be initialized by a constant expression

[2026-06-17T19:36:53.163Z]   139 |         static constexpr uintptr_t kBusyMask = uintptr_t(1) << 63;

[2026-06-17T19:36:53.163Z]       |                                    ^           ~~~~~~~~~~~~~~~~~~

[2026-06-17T19:36:53.163Z] /home/couchbase/jenkins/workspace/line_couchbase-lite-core_PR-2503/couchbase-lite-core/vendor/fleece/Fleece/Support/RefCounted.cc:139:61: note: shift count 63 >= width of type 'uintptr_t' (aka 'unsigned int') (32 bits)

[2026-06-17T19:36:53.163Z]   139 |         static constexpr uintptr_t kBusyMask = uintptr_t(1) << 63;

@pasin pasin merged commit 4a65a55 into release/4.1 Jun 18, 2026
3 checks passed
@pasin pasin deleted the fix/another-atomic-ref-build-error branch June 18, 2026 23:12
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.

3 participants