This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: 1.3.13: problem using ntohs() in asm/bytorder.h in gcc 3.2.
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 4 Nov 2002 15:45:01 -0500
- Subject: Re: 1.3.13: problem using ntohs() in asm/bytorder.h in gcc 3.2.
- References: <5.1.1.6.0.20021104211313.01f88058@wheresmymailserver.com>
- Reply-to: cygwin at cygwin dot com
On Mon, Nov 04, 2002 at 09:15:59PM +0100, Jens Yllman wrote:
>Sorry, most have hade a total melt down. The following code creates the
>problem.
>
>#include <netinet/in.h>
>
>void test( void )
>{
> short x = ::ntohs( 128 );
>}
>
>Compiling it with the g++ -O2 returns the following error. Removing -O2
>removes the error. Or as I said before -U__OPTIMIZE__
>
>test.cpp: In function `void test()':
>test.cpp:5: parse error before `__builtin_constant_p'
Get rid of the ::. ntohs is a macro.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/