Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149247 Details for
Bug 229459
useless warning using anonymous bitfield
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch that fixes the bug by silencing the warning
gcc-sra-nowarn-anon-bitfld.patch (text/plain), 2.69 KB, created by
Alexandre Oliva
on 2007-03-05 07:35:11 UTC
(
hide
)
Description:
Patch that fixes the bug by silencing the warning
Filename:
MIME Type:
Creator:
Alexandre Oliva
Created:
2007-03-05 07:35:11 UTC
Size:
2.69 KB
patch
obsolete
>for gcc/ChangeLog >from Alexandre Oliva <aoliva@redhat.com> > > * c-decl.c (grokdeclarator): Disable warnings for anonymous > bitfields. > * tree-sra.c (instantiate_element): Propagate disabled warnings > from the element itself to the created variable. > >for gcc/cp/ChangeLog >from Alexandre Oliva <aoliva@redhat.com> > > * decl.c (grokdeclarator): Disable warnings for anonymous > bitfields. > >Index: trunk/gcc/c-decl.c >=================================================================== >--- trunk.orig/gcc/c-decl.c 2007-02-27 01:59:21.000000000 -0300 >+++ trunk/gcc/c-decl.c 2007-03-05 04:22:21.000000000 -0300 >@@ -1,6 +1,6 @@ > /* Process declarations and variables for C compiler. > Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, >- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. >+ 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. > > This file is part of GCC. > >@@ -4760,6 +4760,8 @@ grokdeclarator (const struct c_declarato > type = c_build_qualified_type (type, type_quals); > decl = build_decl (FIELD_DECL, declarator->u.id, type); > DECL_NONADDRESSABLE_P (decl) = bitfield; >+ if (bitfield && !declarator->u.id) >+ TREE_NO_WARNING (decl) = 1; > > if (size_varies) > C_DECL_VARIABLE_SIZE (decl) = 1; >Index: trunk/gcc/cp/decl.c >=================================================================== >--- trunk.orig/gcc/cp/decl.c 2007-03-03 03:53:47.000000000 -0300 >+++ trunk/gcc/cp/decl.c 2007-03-05 04:24:34.000000000 -0300 >@@ -1,6 +1,6 @@ > /* Process declarations and variables for C++ compiler. > Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, >- 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. >+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. > Contributed by Michael Tiemann (tiemann@cygnus.com) > > This file is part of GCC. >@@ -8539,6 +8539,9 @@ grokdeclarator (const cp_declarator *dec > { > decl = build_decl (FIELD_DECL, unqualified_id, type); > DECL_NONADDRESSABLE_P (decl) = bitfield; >+ if (bitfield && !unqualified_id) >+ TREE_NO_WARNING (decl) = 1; >+ > if (storage_class == sc_mutable) > { > DECL_MUTABLE_P (decl) = 1; >Index: trunk/gcc/tree-sra.c >=================================================================== >--- trunk.orig/gcc/tree-sra.c 2007-03-03 03:53:50.000000000 -0300 >+++ trunk/gcc/tree-sra.c 2007-03-05 04:17:47.000000000 -0300 >@@ -1240,7 +1240,8 @@ instantiate_element (struct sra_elt *elt > DECL_DEBUG_EXPR_IS_FROM (var) = 1; > > DECL_IGNORED_P (var) = 0; >- TREE_NO_WARNING (var) = TREE_NO_WARNING (base); >+ TREE_NO_WARNING (var) = TREE_NO_WARNING (base) >+ || (elt->element ? TREE_NO_WARNING (elt->element) : false); > } > else > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229459
:
148471
| 149247