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

Bug#741960: marked as done (gcc-4.7: [C++] Bogus narrowing conversion warning when initializing bit-field in union)



Your message dated Tue, 23 Jun 2015 07:24:48 +0000
with message-id <E1Z7IZc-0001tY-Ii@franck.debian.org>
and subject line Bug#789156: Removed package(s) from unstable
has caused the Debian Bug report #741960,
regarding gcc-4.7: [C++] Bogus narrowing conversion warning when initializing bit-field in union
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.)


-- 
741960: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741960
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-4.7
Version: 4.7.2-5
Severity: normal

Dear Maintainer,

Compiling the following as C++ with -Wall:

unsigned int n;
union U { unsigned int x:8; } u = { n };

results in:

$ gcc-4.7 -Wall -c test.cpp
test.cpp:2:39: warning: narrowing conversion of 'n' from 'unsigned int' to 'unsigned char' inside { } is ill-formed in C++11 [-Wnarrowing]

The type of the field U::x is not unsigned char: it is unsigned int.
Since u.x and n have the same type, there is no narrowing conversion
as defined in [dcl.init.list].

(See also <http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1461>)

This bug seems to affect only unions, not ordinary structs.

-- System Information:
Debian Release: 7.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'oldstable-updates'), (500, 'stable'), (500, 'oldstable'), (50, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gcc-4.7 depends on:
ii  binutils      2.22-8
ii  cpp-4.7       4.7.2-5
ii  gcc-4.7-base  4.7.2-5
ii  libc6         2.13-38
ii  libgcc1       1:4.7.2-5
ii  libgmp10      2:5.0.5+dfsg-2
ii  libgomp1      4.7.2-5
ii  libitm1       4.7.2-5
ii  libmpc2       0.9-4
ii  libmpfr4      3.1.0-5
ii  libquadmath0  4.7.2-5
ii  zlib1g        1:1.2.7.dfsg-13

Versions of packages gcc-4.7 recommends:
ii  libc6-dev  2.13-38

Versions of packages gcc-4.7 suggests:
pn  binutils-gold        <none>
ii  gcc-4.7-doc          4.7.2-2
pn  gcc-4.7-locales      <none>
ii  gcc-4.7-multilib     4.7.2-5
ii  libcloog-ppl0        0.15.11-4
pn  libgcc1-dbg          <none>
pn  libgomp1-dbg         <none>
pn  libitm1-dbg          <none>
pn  libmudflap0-4.7-dev  <none>
pn  libmudflap0-dbg      <none>
pn  libppl-c2            <none>
pn  libppl7              <none>
pn  libquadmath0-dbg     <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 4.7.4-3+rm

Dear submitter,

as the package gcc-4.7 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/789156

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: