Apparently this was documented in older releases. Here is a page from the archived documentation going all the way back to version 3.0 of the MATLAB Compiler (circa MATLAB 6.5 R13):
%#mex
This pragma informs the MATLAB Compiler to select the MEX-file over an existing M-file.
If you are using the
%#function
pragma to define functions that are not available in M-code, you should use the%#external
pragma to define the function. For example:function y = gamma(x) %#mex error('gamma MEX-file is missing');
Here is another related page that explains when this pragma is used:
It is now possible to call MEX-files from Compiler-generated stand-alone applications. The Compiler will compile MEX-files whenever they are specified on the command line or are located using the -h option to find helper functions. The MEX-files will then be loaded and called by the stand-alone code.
If an M-file and a MEX-file appear in the same directory and the M-file contains at least one function, the Compiler will compile the M-file instead of the MEX-file. If the MEX-file is desired instead, you must use the %#mex pragma. For more information on this pragma, see the %#mex reference page.
of course the MATLAB Compiler was a completely different product back then, capable of producing standalone C/C++ programs and MEX-files (no MCR dependency like today's version)
It seems that mlint
still recognizes this pragma and completely excludes the M-file from analysis.