Found in the July 2026 AI-assisted code review (Claude Code); all verified dead by grep/typechecker analysis.
In the generator:
- The "three or more dimensions — punt" branch in
mex_marshal_array (src/mwrap-cgen.cc) is unreachable: the typechecker rejects >2-D arrays for every array tinfo.
mwrap_compat_type_support (~30 lines, commented out) and its commented-out call site in print_mex_init are relics.
mw_use_longlong / mw_use_ulonglong are declared extern in src/mwrap-ast.h but defined and referenced nowhere (would be a link error if ever used).
Shipped into every generated MEX via the support blob (src/mwrap-support.c):
mxWrapGetP_single, mxWrapCreateP_single, mxWrapStrncpy_single, mxWrapGetString_single are defined but never referenced by any emitted code — dead weight in every generated file and a source of unused-function warnings on some compilers.
In the Python port:
TokenType.EOF is never emitted by the lexer, so the EOF branch in Parser.feed is unreachable (end-of-file is handled by finish_file).
Constraints: src/mwrap-support.c and python/mwrap_support.c must stay byte-identical; support-blob removals change every generated file, so best paired with a minor release. Run testing/test_python.sh and the Octave suite after pruning.
Found in the July 2026 AI-assisted code review (Claude Code); all verified dead by grep/typechecker analysis.
In the generator:
mex_marshal_array(src/mwrap-cgen.cc) is unreachable: the typechecker rejects >2-D arrays for every array tinfo.mwrap_compat_type_support(~30 lines, commented out) and its commented-out call site inprint_mex_initare relics.mw_use_longlong/mw_use_ulonglongare declaredexterninsrc/mwrap-ast.hbut defined and referenced nowhere (would be a link error if ever used).Shipped into every generated MEX via the support blob (
src/mwrap-support.c):mxWrapGetP_single,mxWrapCreateP_single,mxWrapStrncpy_single,mxWrapGetString_singleare defined but never referenced by any emitted code — dead weight in every generated file and a source of unused-function warnings on some compilers.In the Python port:
TokenType.EOFis never emitted by the lexer, so the EOF branch inParser.feedis unreachable (end-of-file is handled byfinish_file).Constraints:
src/mwrap-support.candpython/mwrap_support.cmust stay byte-identical; support-blob removals change every generated file, so best paired with a minor release. Runtesting/test_python.shand the Octave suite after pruning.