From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11936 invoked by alias); 14 Feb 2006 12:08:05 -0000 Received: (qmail 11920 invoked by uid 48); 14 Feb 2006 12:08:02 -0000 Date: Tue, 14 Feb 2006 12:08:00 -0000 Message-ID: <20060214120802.11919.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26195] [4.0/4.1/4.2 regression] pragma interface no longer handles explicit names In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "zak at transversal dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg01498.txt.bz2 List-Id: ------- 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