This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC4 status.


Corinna Vinschen wrote:

> #1)
> 
>   sftp.c:368: warning: 'opterr' redeclared without dllimport attribute:
>   previous dllimport ignored
> 
>   Yes, well, so what?

  This one IIRC has some significance.  If you declare any extern symbols at
all with dllimport attributes, it disables auto-import altogether.  So a stray
definition like that can break linking all the other functions that would
normally be auto-imported.

> #2)
> 
>   /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld:
>   warning: auto-importing has been activated without --enable-auto-import
>   specified on the command line.
>   This should work unless it involves constant data structures referencing
>   symbols from auto-imported DLLs.
> 
>   *Sob*  Yes, officer, I confess everything!  But *please* don't tell
>   me this every time I dare to link an application.
> 
> Is there any chance to get rid of this really useless stuff upstream?

  I don't know.  We could turn on auto import globally but that will pessimize
a whole bunch of stuff that needn't be affected.  We could discard the warning
altogether but then people would get silent failures.

  What would be best of all would be to only issue the warning if a const data
structure reference of the kind mentioned actually occurs.  I haven't looked
to see if that's possible to detect yet, but it would be a nice fix for
upstream ld.

  As a workaround, the sources could always be fixed.  Inconsistent
declarations *is* a correctness issue, after all, and it's usually trivial to
add an item to LDFLAGS.

  Also, perhaps as a half-way compromise measure, auto import could be enabled
in the GCC specs for just C++/ObjC++/Java.  I don't know what's for the best
yet, does anyone else have any suggestions?

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]