------- Comment #7 from zak at transversal dot com 2006-02-14 12:08 ------- (We are currently using these pragmas extensively to ensure that various symbols are laid down *only* in low-level libraries, as a partial workaround for the COMDAT/dlopen issues described in http://gcc.gnu.org/ml/gcc/2004-10/msg01118.html)
My patch doesn't touch the lbasename call used to create the implicit parameter to the directives (ie the one stored in ifiles and passed to interface_strcmp) -- so the path by which the file is included shouldn't affect the matching between pragmas without explicit parameters. The change only affects the filename passed to get_fileinfo. If a header is included in one place as "[path1]/foo.h" and in another as "[path2]/foo.h", then there will be two c_fileinfo structs, but both will have processed the pragmas in the same way (and with the same implicit parameter "foo.h"), causing interface_only and interface_unknown to be identical in the two structs. Even if it was necessary, retaining the lbasename calls for the implicit case doesn't seem practical as the calls to get_fileinfo are made precisely to find out whether these pragmas are in effect (by looking at interface_only and interface_unknown) -- hence the argument to the call can't easily depend on those same pragmas. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26195