Skip to content

fix: init.c prototypes + header comment, and finish inst/WORDLIST (PUNY-qguubpin, PUNY-ddljtzrv) - #96

Merged
bart-turczynski merged 2 commits into
mainfrom
chore/init-prototypes-wordlist
Jul 26, 2026
Merged

bart-turczynski merged 2 commits into
mainfrom
chore/init-prototypes-wordlist

Conversation

@bart-turczynski

Copy link
Copy Markdown
Owner

Two backlog items from the /cran gate review. Independent, one commit each.

src/init.c-Wstrict-prototypes (PUNY-qguubpin)

Three zero-argument entry points were declared () rather than (void). In C
that means unspecified arguments, so clang warned on each, every build. Now
compiles clean.

While in the file: the header comment claimed it was generated by
compileAttributes()
and must not be hand-edited. That's false, and false in
a costly direction — compileAttributes() only rewrites src/RcppExports.cpp
and R/RcppExports.R, neither of which carries R_registerRoutines(). This is
the sole registration point and is hand-maintained. Given
useDynLib(punycoder, .registration = TRUE), a new [[Rcpp::export]] missing
its CallEntries row fails at runtime as "symbol not found" — while the old
comment told the reader registration was automatic. Replaced with one that says
what the file actually requires.

The remaining -pedantic warning (C23 extension, Rboolean) comes from R's
own R_ext/Boolean.h and is not actionable here.

inst/WORDLIST — the last 18 words (PUNY-ddljtzrv)

spell_check_package() now reports zero flagged words, down from 34. The
other 16 were Fiberplane issue slugs, removed from NEWS.md in f42d483 rather
than suppressed here. The file is LC_ALL=C sorted; I verified that convention
first, so the diff is 18 pure insertions with nothing reordered.

Only silences the local check — CRAN runs its own aspell and ignores
inst/WORDLIST. The current R CMD check --as-cran has no misspelled-words
NOTE either way.

Verification

Clean rebuild per AGENTS.md (rm -f src/*.o; R CMD INSTALL .) — zero
warnings
from init.c. Full suite run against the installed build rather
than devtools::test(), to avoid leaving -O0 objects in src/:
529 pass, 0 fail. spell_check_package() clean.

🤖 Generated with Claude Code

bart-turczynski and others added 2 commits July 26, 2026 15:38
…er (PUNY-qguubpin)

Three declarations used () instead of (void). In C that means "unspecified
arguments", not "no arguments", so clang emitted -Wstrict-prototypes for each on
every build: _punycoder_backend_info_cpp,
_punycoder_normalization_unicode_version_cpp, _punycoder_unicode_versions_cpp.
A clean rebuild now compiles init.c with no warnings.

Also replace the header comment, which claimed the file is generated by Rcpp's
compileAttributes() and must not be edited by hand. That is false and misleading
in a way that can cost a runtime failure: compileAttributes() rewrites
src/RcppExports.cpp and R/RcppExports.R only, neither of which carries
R_registerRoutines(), so this file is the sole registration point and is
maintained by hand. With useDynLib(punycoder, .registration = TRUE), a new
[[Rcpp::export]] whose CallEntries row is missing fails at runtime as
"symbol not found", not at compile time -- and the old comment told the reader
registration was automatic.

The remaining init.c warning under -pedantic builds (enumeration types with a
fixed underlying type are a C23 extension) originates in R's own
R_ext/Boolean.h and is not actionable here.

Verified with rm -f src/*.o && R CMD INSTALL . (clean rebuild, zero warnings)
and the full suite against the installed build: 529 pass, 0 fail.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…NY-ddljtzrv)

spell_check_package() now reports zero flagged words, down from 34 before this
release cycle's cleanup. The other 16 were Fiberplane issue slugs, removed from
NEWS.md in f42d483 rather than suppressed here.

Added: ADR, Dependabot, LDH, NFD, OSS, TRE, UCD, bytewise, canonicalizer,
hardcoded, mispredicting, normalizations, pre, selectable, transcode,
transcoded, trie, unshipped.

The file is LC_ALL=C sorted; verified that convention before editing and
re-sorted, so the diff is 18 pure insertions with nothing reordered.

Note this only silences the local spelling check. CRAN runs its own aspell and
does not read inst/WORDLIST; the current R CMD check --as-cran produces no
misspelled-words NOTE regardless.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bart-turczynski
bart-turczynski merged commit 053be61 into main Jul 26, 2026
11 checks passed
@bart-turczynski
bart-turczynski deleted the chore/init-prototypes-wordlist branch July 26, 2026 14:15
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