* [Bug c/12625] bitfields of size 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
@ 2003-10-15 18:09 ` nomura at netapp dot com
2003-10-15 18:16 ` nomura at netapp dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nomura at netapp dot com @ 2003-10-15 18:09 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
nomura at netapp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC host triplet| |Linux Redhat 8
GCC target triplet| |i686-pc-linux-gnu
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/12625] bitfields of size 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
2003-10-15 18:09 ` [Bug c/12625] " nomura at netapp dot com
@ 2003-10-15 18:16 ` nomura at netapp dot com
2003-10-15 18:17 ` [Bug c/12625] bitfields which have sizes that are powers of " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: nomura at netapp dot com @ 2003-10-15 18:16 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
nomura at netapp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC host triplet|Linux Redhat 8 |i686-pc-linux-gnu
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
2003-10-15 18:09 ` [Bug c/12625] " nomura at netapp dot com
2003-10-15 18:16 ` nomura at netapp dot com
@ 2003-10-15 18:17 ` pinskia at gcc dot gnu dot org
2004-01-19 19:29 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-15 18:17 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC host triplet|i686-pc-linux-gnu |
GCC target triplet|i686-pc-linux-gnu |
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-10-15 18:17:19
date| |
Summary|bitfields of size 8 missed |bitfields which have sizes
|by -Wparentheses |that are powers of 8 missed
| |by -Wparentheses
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-15 18:17 -------
I can confirm this. Also it is not just size 8 that does it as 16 (and 32 on a long long) does it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (2 preceding siblings ...)
2003-10-15 18:17 ` [Bug c/12625] bitfields which have sizes that are powers of " pinskia at gcc dot gnu dot org
@ 2004-01-19 19:29 ` pinskia at gcc dot gnu dot org
2004-07-20 14:51 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-19 19:29 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (3 preceding siblings ...)
2004-01-19 19:29 ` pinskia at gcc dot gnu dot org
@ 2004-07-20 14:51 ` pinskia at gcc dot gnu dot org
2004-07-20 14:59 ` jsm at polyomino dot org dot uk
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-20 14:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-20 14:51 -------
Fixed for 3.5.0 by the bitfield patch for C.
: Search converges between 2004-07-08-trunk (#482) and 2004-07-09-trunk (#483).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (4 preceding siblings ...)
2004-07-20 14:51 ` pinskia at gcc dot gnu dot org
@ 2004-07-20 14:59 ` jsm at polyomino dot org dot uk
2004-07-20 15:15 ` [Bug c++/12625] " giovannibajo at libero dot it
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-07-20 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-07-20 14:59 -------
Subject: Re: bitfields which have sizes that are powers of 8
missed by -Wparentheses
On Tue, 20 Jul 2004, pinskia at gcc dot gnu dot org wrote:
> Fixed for 3.5.0 by the bitfield patch for C.
I've committed the following testcase for this bug as none was included
with the bit-field patch. Note however that the bug still exists for C++.
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.4022
diff -u -r1.4022 ChangeLog
--- ChangeLog 20 Jul 2004 09:57:09 -0000 1.4022
+++ ChangeLog 20 Jul 2004 14:57:27 -0000
@@ -1,3 +1,7 @@
+2004-07-20 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * gcc.dg/pr12625-1.c: New test.
+
2004-07-20 Steven Bosscher <stevenb@suse.de>
* testsuite/gcc.dg/switch-warn-1.c: New test.
Index: gcc.dg/pr12625-1.c
===================================================================
RCS file: gcc.dg/pr12625-1.c
diff -N gcc.dg/pr12625-1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc.dg/pr12625-1.c 20 Jul 2004 14:57:27 -0000
@@ -0,0 +1,13 @@
+/* Warning for assignment used as truth-value should apply for
+ bit-fields. */
+/* Origin: bug 12625 from nomura at netapp.com */
+/* { dg-do compile } */
+/* { dg-options "-Wparentheses" } */
+
+static struct { int i:8; } s;
+
+void
+foo ()
+{
+ if (s.i = 0) ; /* { dg-warning "parentheses" "warning for bit-field" } */
+}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (5 preceding siblings ...)
2004-07-20 14:59 ` jsm at polyomino dot org dot uk
@ 2004-07-20 15:15 ` giovannibajo at libero dot it
2004-07-22 3:22 ` pinskia at gcc dot gnu dot org
2004-10-13 12:35 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2004-07-20 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-07-20 15:15 -------
Then, reopening this as a C++ bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Component|c |c++
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (6 preceding siblings ...)
2004-07-20 15:15 ` [Bug c++/12625] " giovannibajo at libero dot it
@ 2004-07-22 3:22 ` pinskia at gcc dot gnu dot org
2004-10-13 12:35 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-22 3:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12625] bitfields which have sizes that are powers of 8 missed by -Wparentheses
2003-10-15 18:07 [Bug c/12625] New: bitfields of size 8 missed by -Wparentheses nomura at netapp dot com
` (7 preceding siblings ...)
2004-07-22 3:22 ` pinskia at gcc dot gnu dot org
@ 2004-10-13 12:35 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-13 12:35 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12625
^ permalink raw reply [flat|nested] 10+ messages in thread