[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#530949: marked as done (gcc-4.4: warns about idiomatic use of Berkeley sockets)



Your message dated Sun, 05 Jul 2015 16:18:22 +0000
with message-id <E1ZBmcY-0006gk-9d@franck.debian.org>
and subject line Bug#707276: Removed package(s) from unstable
has caused the Debian Bug report #530949,
regarding gcc-4.4: warns about idiomatic use of Berkeley sockets
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 owner@bugs.debian.org
immediately.)


-- 
530949: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530949
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.4
Version: 4.4.0-5
Severity: wishlist

With the attached C file, gcc-4.4 warns:

  lakeview ok % gcc-4.4 -O2 -Wall socket.c
  socket.c: In function ‘main’:
  socket.c:20: warning: dereferencing pointer ‘sin’ does break strict-aliasing rules
  socket.c:21: warning: dereferencing pointer ‘sin’ does break strict-aliasing rules
  socket.c:19: warning: dereferencing pointer ‘sin’ does break strict-aliasing rules
  socket.c:12: note: initialized from here
  socket.c:23: warning: dereferencing pointer ‘sa’ does break strict-aliasing rules
  socket.c:11: note: initialized from here

This is a standard and idiomatic usage of Berkeley sockets.  AFAIK,
there is no other way to work with the sockets interface, and even if
there were, this method is extremely common, not to mention sanctioned
by POSIX.

gcc-4.4 should not warn with -Wall, which is supposed to be a sane
default with useful warnings.  I don't mind if gcc-4.4 warns with some
esoteric option, but warning about sockets-using code with -O2 -Wall is
silly.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-rc5-amd64 (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 gcc-4.4 depends on:
ii  binutils                      2.19.1-1   The GNU assembler, linker and bina
ii  cpp-4.4                       4.4.0-5    The GNU C preprocessor
ii  gcc-4.4-base                  4.4.0-5    The GNU Compiler Collection (base 
ii  libc6                         2.9-13     GNU C Library: Shared libraries
ii  libgcc1                       1:4.4.0-5  GCC support library
ii  libgomp1                      4.4.0-5    GCC OpenMP (GOMP) support library

Versions of packages gcc-4.4 recommends:
ii  libc6-dev                     2.9-13     GNU C Library: Development Librari

Versions of packages gcc-4.4 suggests:
pn  gcc-4.4-doc                   <none>     (no description available)
pn  gcc-4.4-locales               <none>     (no description available)
ii  gcc-4.4-multilib              4.4.0-5    The GNU C compiler (multilib files
pn  libgcc1-dbg                   <none>     (no description available)
pn  libgomp1-dbg                  <none>     (no description available)
pn  libmudflap0-4.4-dev           <none>     (no description available)
pn  libmudflap0-dbg               <none>     (no description available)

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>

int main(void)
{
	struct sockaddr_storage addr;
	struct sockaddr *sa = (struct sockaddr *) &addr;
	struct sockaddr_in *sin = (struct sockaddr_in *) &addr;
	int sock;

	sock = socket(AF_INET, SOCK_STREAM, 0);
	if (sock < 0)
		return 1;

	sin->sin_family = AF_INET;
	sin->sin_port = htons(80);
	sin->sin_addr.s_addr = INADDR_LOOPBACK;

	assert(sa->sa_family == AF_INET);

	if (connect(sock, sa, sizeof(*sin)) < 0)
		return 2;

	close(sock);

	return 0;
}

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 1:4.4.7-8+rm

Dear submitter,

as the package gcc-4.4 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/707276

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Luca Falavigna (the ftpmaster behind the curtain)

--- End Message ---

Reply to: