This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Redeclaration of used symbols
Jan Hubicka <jh@suse.cz> writes:
| Hard error sounds like most plausible sollution to me as well, however
| duplicate_decls is a black magic for me, what code you do have in mind?
duplicate_decls should be broken in logical units one day...
| In general it would be nice if we can avoid changing the declarations
| of functions and variables once they have been defined...
Yep. You need to be careful about
static inline int max(int a, int b) { return b > a ? a : b; }
// ...
void f(int a, int b)
{
extern int min(int, int); // common practice in C
int j = min(a, b);
}
-- Gaby