Menu

#8 mcpp skip some dependencies

v1.0 (example)
open
nobody
None
5
2014-01-05
2014-01-05
MikeY
No

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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.