[cft] rewrite i386 dllimport/dllexport

Richard Henderson rth@redhat.com
Thu Mar 29 22:31:00 GMT 2007

On Thu, Mar 29, 2007 at 10:07:28PM +1200, Danny Smith wrote:
> In winnt.c: i386_pe_encode_section_info: 
> When generating the decorated name for stdcall/fastcall symbols, your
> patch
> does this:
> +	      XSTR (symbol, 0) = IDENTIFIER_POINTER (newid);
> 'symbol' has not yet been initialised,

I'd managed to find that myself after I posted the patch.

> foo.c:3: warning: 'foo' redeclared without dllimport attribute after
> being referenced with dll linkage
> foo.c:3: internal compiler error: in
> i386_pe_asm_output_aligned_decl_common, at config/i386/winnt.c:487

Fixed by simply removing the assert.  We'll get something random
as the result, and the user will have to fix up their code.  I'm
not sure why we just warn here, instead of hard error.



More information about the Gcc-patches mailing list