This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/118: Re: spurious warning on increment of bitfield
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/118: Re: spurious warning on increment of bitfield
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 16 Mar 2000 20:48:58 +0100
- References: <2F78B0E5B56AD311B71500A0C9B57C36087BBE@viola.threel.co.uk>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, iay at 3L dot co dot uk
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 118
>Category: c++
>Synopsis: spurious warning on increment of bitfield
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 16 12:06:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Ian Young <iay@3L.co.uk>
>Release: 2.95.2
>Organization:
>Environment:
>Description:
Original-Message-ID: <2F78B0E5B56AD311B71500A0C9B57C36087BBE@viola.threel.co.uk>
Date: Thu, 16 Mar 2000 13:02:05 -0000
Solaris 2.6, GCC 2.95.2
y.cpp:
struct proc {
unsigned c: 16;
};
void f(struct proc *p)
{
p->c++;
}
% g++ -c -Wall y.cpp
y.cpp: in function `void f(proc *)':
y.cpp:7: warning: value computed is not used
The warning does not occur if, for example, c is defined as an unsigned
short.
-- Ian
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: