This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Redeclaration of used symbols
- From: Jan Hubicka <jh at suse dot cz>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc at gcc dot gnu dot org, schwab at suse dot de,rth at redhat dot com
- Date: Sun, 7 Sep 2003 19:25:50 +0200
- Subject: Re: Redeclaration of used symbols
- References: <20030907135208.GC14387@kam.mff.cuni.cz> <87he3oy1s7.fsf@egil.codesourcery.com>
> > If so, what should be semantic in function-at-a-time compilation?
> > If not, what is the best way to error about it? (check in
> > duplicate_decls whether entity has an initializer or is used comes
> > into mind)
>
> You could simply remove the special case code in duplicate_decls that
> lets this go through. I am in favor of making it a hard error even in
> non-unit-at-a-time mode -- I don't think the validity of code should
> depend on whether or not the translation unit is being analyzed in
> toto.
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?
In general it would be nice if we can avoid changing the declarations
of functions and variables once they have been defined...
Honza
>
> zw