Your message dated Tue, 13 Feb 2007 00:54:00 +0100 with message-id <20070212235400.GA24332@hades.madism.org> and subject line Bug#271062: /usr/include/sys/select.h: fd_set warnings in C++ has caused the attached Bug report 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 I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: /usr/include/sys/select.h: fd_set warnings in C++
- From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>
- Date: Sat, 21 Aug 2004 01:38:42 +0200
- Message-id: <E1ByIy2-0008PG-00@localhost>
Package: libc6-dev Version: 2.3.2.ds1-16 Severity: minor File: /usr/include/sys/select.h Tags: patch The __FDMASK macro in <sys/select.h> casts the integer 1 to an __fd_mask (which is required to be a long int). This C-style cast yields a warning in application code when compiling in C++, breaking builds that treat warnings as errors. Defining separate versions for C and C++, with different cast syntax, would be unnecessarily bulky. Instead, I would propose to turn the constant "1" (int) into "1L" (long int) and remove the cast. -- System Information: Debian Release: 3.1 Architecture: powerpc (ppc) Kernel: Linux 2.6.7-gcc34 Locale: LANG=en_IN, LC_CTYPE=en_IN Versions of packages libc6-dev depends on: ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an ii linux-kernel-headers 2.5.999-test7-bk-17 Linux Kernel Headers for developme -- no debconf informationdiff include/sys/select.h include-patched/sys/select.h 64c64 < #define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) --- > #define __FDMASK(d) (1L << ((d) % __NFDBITS))
--- End Message ---
--- Begin Message ---
- To: "Jeroen T. Vermeulen" <jtv@xs4all.nl>, 271062-done@bugs.debian.org
- Subject: Re: Bug#271062: /usr/include/sys/select.h: fd_set warnings in C++
- From: Pierre HABOUZIT <madcoder@debian.org>
- Date: Tue, 13 Feb 2007 00:54:00 +0100
- Message-id: <20070212235400.GA24332@hades.madism.org>
- Mail-followup-to: "Jeroen T. Vermeulen" <jtv@xs4all.nl>, 271062-done@bugs.debian.org
- In-reply-to: <20040911212116.GB81003@xs4all.nl>
- References: <E1ByIy2-0008PG-00@localhost> <817jr0r9xr.wl@omega.webmasters.gr.jp> <20040911212116.GB81003@xs4all.nl>
tag 271062 + wontfix thanks On Sat, Sep 11, 2004 at 11:21:16PM +0200, Jeroen T. Vermeulen wrote: > On Sun, Sep 12, 2004 at 02:29:20AM +0900, GOTO Masanori wrote: > > > Which compiler did you use? It should not be happneded with gcc/g++. > > It did. I tried with g++ 3.3 and 3.4, and both give this warning. I know > g++ and gcc don't normally give warnings for the standard headers, but in > this case the problem occurs in a macro, so the actual warning is located > in the source file, not the header. > One important fact I forgot to mention is that I enable a lot of warning > options. The warning does not occur with the default configuration, but I > do get it with -Wold-style-cast. Which is otherwise a perfectly reasonable > option to use and doesn't evoke any other warnings in this 10,000-line > project. It's a reasonable option when you do pure C++ code. sadly, libc includes are obviously meant to be used in C, hence there will be quite a lot of old style (wrt C++) casts, and it's not a reasonable compilation option to use in that context. There is a lot of old style casts in the libc: (void) casts in pthread.h, various (unsigned/long/int) casts in obstack.h, and an awful list of them in the netinet/ includes. To cite only a few. If you use stock C includes, you're bound to meet such problems, and well, you'll have to live with it. There is not always a workaround like here, for most of them the alternative syntax would be static_cast<foo>(...) which is not valid in C. We won't "fix" that, as it's not always doable anyway. -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.orgAttachment: pgpNidpQ2_3hN.pgp
Description: PGP signature
--- End Message ---