Your message dated Sun, 20 Apr 2008 18:47:09 +0200 with message-id <[EMAIL PROTECTED]> and subject line Re: g++-4.3: Integer variable value lost due to optimizations? has caused the Debian Bug report #456930, regarding g++-4.3: Integer variable value lost due to optimizations? to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [EMAIL PROTECTED] immediately.) -- 456930: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456930 Debian Bug Tracking System Contact [EMAIL PROTECTED] with problems
--- Begin Message ---Package: g++-4.3 Version: 4.3-20071130-1 Severity: normal Hi, I've got the following code to constructor an acceptor: server::server(asio::io_service& io_service, request_handler& req_handler, int fcgi_port): acceptor_(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), fcgi_port)), io_service_(io_service), new_connection_(new connection(io_service, *this)), request_handler_(req_handler) { #ifdef TCP_DEFER_ACCEPT int v = true; setsockopt(acceptor_.native(), IPPROTO_TCP, TCP_DEFER_ACCEPT, &v, sizeof(v)); #endif acceptor_.async_accept(new_connection_->socket(), boost::bind(&server::handle_accept, this, asio::placeholders::error)); } With CMAKE_BUILD_TYPE release, bind is called with port = 0 bind(8, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 although I'm quite sure it should be 2711. Without CMAKE_BUILD_TYPE release, the code works fine. I can't guarantee this is a bug in g++ though. I'll try to reproduce this with less code. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.23-1-686 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages g++-4.3 depends on: ii gcc-4.3 4.3-20071130-1 The GNU C compiler ii gcc-4.3-base 4.3-20071130-1 The GNU Compiler Collection (base ii libc6 2.7-4 GNU C Library: Shared libraries ii libgmp3c2 2:4.2.2+dfsg-1 Multiprecision arithmetic library ii libmpfr1ldbl 2.3.0.dfsg.1-2 multiple precision floating-point ii libstdc++6-4.3-dev 4.3-20071130-1 The GNU Standard C++ Library v3 (d g++-4.3 recommends no packages. -- no debconf information
--- End Message ---
--- Begin Message ---not a bug: basic_endpoint() : data_() { asio::detail::sockaddr_in4_type& data = reinterpret_cast<asio::detail::sockaddr_in4_type&>(data_); data.sin_family = 2; data.sin_port = 0; data.sin_addr.s_addr = ((in_addr_t) 0x00000000); } you are violating C/C++ type-based aliasing rules here (and in other places).
--- End Message ---

