This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
#pragma redefine_extname and local declarations
- From: Mark Mitchell <mark at codesourcery dot com>
- To: zack at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org, "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Date: Mon, 20 Sep 2004 16:16:30 -0700
- Subject: #pragma redefine_extname and local declarations
- Organization: CodeSourcery, LLC
Joseph, Zack --
Given:
#pragma redefine_extname f g
int main () {
extern int f();
f();
}
we do not rename "f" to "g". Perhaps even more dramatic is the case
where there is no declaration of "f" at all; because that results in an
implicit local declarations we get the same behavior.
This did not work in GCC 3.4 either, so I don't think it had anything to
do with Zack's changes to redefine_extname in GCC 4.0. But, I'd be
curious as to whether or not you think that this behavior is as
desired. If you don't think this is the desired behavior, then perhaps
we should be calling maybe_apply_renaming_pragma more often -- after
every function declaration with external linkage in finish_decl, rather
than just those with global scope.
Thoughts?
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com