mcpp skip some dependencies
Brought to you by:
kmatsui
mcpp with -MD or -MF options generates invalid dependencies output. It happens for similar headers like:
include/ios
and
include/iostream. At this case mccp will skip header with shorter name. It seems the problem in system.c file, function put_depend(...):
...
fnamlen = strlen( filename);
/ Check the recorded filename /
for (pos_p = pos; pos_p < &pos[ pos_num]; pos_p++) {
if (memcmp( output + pos_p, filename, fnamlen) == 0)
return; / Already recorded filename */
}
...
memcmp will compare "include/ios" with "include/iostream" (already added in 'pos' table early) like 'starting_with' algorithm w/o taking into account string length.