Subject: -fno-inline -O1 breaks ntohs()
From: Stefan Traby <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 17 Sep 2006 22:11:27 +0200

Hi!

Testcase:
------------------------------
#include <arpa/inet.h>

int main()
{
  volatile short s = 33, t;

  t = ntohs(s);
  return 0;
}
------------------------------

> i686-pc-cygwin-gcc -fno-inline  -o test test.c
> i686-pc-cygwin-gcc -O1 -fno-inline  -o test test.c
/tmp/ccswmuY9.o:test.c:(.text+0x27): undefined reference to `___ntohs'
collect2: ld returned 1 exit status
>

This is my crosscompiler (gcc-4.1.1) but it breaks with gcc-3.4.4
(included in cygwin) exactly the same way (it compiles without -O1
and breaks otherwise).

If -fno-inline is not supported under cygwin sorry for wasting your time.

-- 

  ciao - 
    Stefan

"               Whip me.  Beat me.  Make me maintain VMS.                   "

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/