You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned by @MichaelChirico in #7517 (comment), we need a check that hides by default all the non-standard extensions that the code may be using (because they may be hidden by default on e.g. FreeBSD). Then our code will not pass the check without explicitly asking for them (e.g. by #define-ing _POSIX_C_SOURCE). We have hit this problem before when a change that used a C23 feature passed CI but failed with cc() (which now uses -std=c11).
I think a practical way to address this would be to add a dedicated CI job that enforces strict C99 compliance by default, explicitly disabling non-standard extensions.
Proposed approach
Add an additional CI configuration that builds data.table with:
-std=c99
-pedantic
-Werror
and without defining feature-test macros like _POSIX_C_SOURCE, _GNU_SOURCE, etc.
This job would be separate from existing CI (so it doesn’t replace current checks), but would act as a guardrail to catch accidental reliance on platform-specific or compiler-enabled extensions.
Why this helps
Some platforms (e.g. FreeBSD or certain libc setups) expose non-standard features by default, which can mask portability issues.
A strict C99 build ensures we only rely on features explicitly allowed by the standard unless we consciously opt into extensions.
This mirrors the earlier issue mentioned where code passed CI under one compiler mode but failed under another (cc vs gcc / different -std flags).
Implementation details
The CI job could live alongside existing ones (e.g. GitHub Actions or CI scripts) and simply fail fast if non-standard features are used.
If certain files require extensions, those can be handled explicitly via localized macros or documented exceptions, instead of relying on implicit defaults.
This should give early visibility into portability regressions while keeping current CI behavior unchanged for users and contributors.
Rscript -e 'l=tail(readLines("data.table.Rcheck/00check.log"), 1L); notes<-"Status: 1 NOTE"; if (!identical(l, notes)) stop("Last line of ", shQuote("00check.log"), " is not ", shQuote(notes), " (V8 package) but ", shQuote(l)) else q("no")'
It just needs to be carefully done to avoid unintended warnings from R using C23 features while C99 mode is enabled. Also, CI is broken (website stuck at December 26) until #7534 is fixed.
The stricter_c99 branch and commit f02dcb7 already seem to implement the core requirement of #7599 — enforcing strict C99 in CI to catch accidental reliance on extensions.
From what I can tell, the remaining blockers are not conceptual but practical:
warnings triggered by R itself using newer (C23) constructs under C99
current CI / website breakage until #7534 is resolved
It sounds like the right next step is to treat this as “implemented but not yet mergeable”, and revisit once CI is unblocked, possibly tightening or scoping the checks to avoid noise from R internals.
I’m happy to help investigate or minimize the remaining warnings once CI is back in a good state, if that would be useful.
Activity
akshhkaushik commentedon Jan 20, 2026
I think a practical way to address this would be to add a dedicated CI job that enforces strict C99 compliance by default, explicitly disabling non-standard extensions.
Proposed approach
Add an additional CI configuration that builds
data.tablewith:-std=c99-pedantic-Werror_POSIX_C_SOURCE,_GNU_SOURCE, etc.This job would be separate from existing CI (so it doesn’t replace current checks), but would act as a guardrail to catch accidental reliance on platform-specific or compiler-enabled extensions.
Why this helps
ccvsgcc/ different-stdflags).Implementation details
This should give early visibility into portability regressions while keeping current CI behavior unchanged for users and contributors.
aitap commentedon Jan 20, 2026
We have something like that, see
data.table/.gitlab-ci.yml
Lines 166 to 182 in e13ea60
It just needs to be carefully done to avoid unintended warnings from R using C23 features while C99 mode is enabled. Also, CI is broken (website stuck at December 26) until #7534 is fixed.
akshhkaushik commentedon Jan 21, 2026
Please correct if i am wrong ,
The stricter_c99 branch and commit f02dcb7 already seem to implement the core requirement of #7599 — enforcing strict C99 in CI to catch accidental reliance on extensions.
From what I can tell, the remaining blockers are not conceptual but practical:
warnings triggered by R itself using newer (C23) constructs under C99
current CI / website breakage until #7534 is resolved
It sounds like the right next step is to treat this as “implemented but not yet mergeable”, and revisit once CI is unblocked, possibly tightening or scoping the checks to avoid noise from R internals.
I’m happy to help investigate or minimize the remaining warnings once CI is back in a good state, if that would be useful.