1.7: gcc 3.4.4 optimization bug ?

Kiran Prakash kiran.prakash.s@gmail.com
Sat Dec 26 17:46:00 GMT 2009


Hi,
I just recently ugraded to cygwin 1.7
I was modifying iftop to work on cygwin, when I ran into this little bug.
I'm generally not so quick to blame the compiler, but I can't find any
other explanation.
char *tmp, options.interface;
The following works.
   if (options.interface[0]=='{')
     {
 tmp=xmalloc( 32+strlen(options.interface) );
    tmp="\\Device\\NPF_";
    strcat(tmp, options.interface);
    xfree(options.interface);
    options.interface=tmp;
     }
   fprintf(stderr, "opening interface:%s\n", options.interface);
This does not.
   if (options.interface[0]=='{')
     {
 tmp=xmalloc( 32+strlen(options.interface) );
    tmp="\\Device\\NPF_";
    strcat(tmp, options.interface);
    xfree(options.interface);
    options.interface=tmp;
     }
   fprintf(stderr, "opening interface:%s\n", tmp);
command line is gcc -g -O2 -L/usr/lib -o iftop.exe ....
Certainly looks like an optimization problem.
Also, is gcc 3.4.4 supported on cygwin 1.7 at all ?
Cheers,
Kiran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 43876 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091226/78c59d09/attachment.obj>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /