Repository navigation
A block-scope extern with no file-scope declaration is the variable's declaration: the STC corpus migrates again (#3231); with migrate takes a directory the file system says is one - #3346
Merged
Conversation
added 2 commits
November 14, 2026 21:09
…e variable's declaration (C11 6.2.2p4): the STC corpus migrates again (#3231)
… one- or two-letter directory was 'cannot read c'); test for the block-scope extern
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.
Nightly #3231,
stc-drift-report. STC declaresextern const uint8_t cutf8_dtab[];inside an inline function; the table is defined in another unit. Since #3244 the migrator refused that function ("names a variable no file-scope declaration in this translation unit gives a type") andmigratefailed the corpus. C11 6.2.2p4: the block declaration declares the file-scope object, so where the unit has no file-scope declaration it is the variable's declaration.ClangBridge.collect_block_scope_externsappends it to the declaration list, once per name; everything downstream treats it as it treats a file-scopeextern.src/main build :stc-drift-reportis green (13/13 files), reproduced red on main first.with migrate <dir>. A directory was recognised by its spelling (no.c/.hending and more than two characters), sowith migrate c -o wsaid "cannot read c". It is a directory when the file system says so.Test:
behav_migrate_block_scope_extern_declares_the_variable(two units, the table defined in the other; a relative two-letter-free directoryc). Fails on the installed compiler, passes here.Battery: GREEN on d6973b6.
Still open on #3231: five
internals-teststime out on the CI runner. Filed on the way: #3344.