public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/47043] New: allow deprecating enum values @ 2010-12-22 18:31 drepper.fsp at gmail dot com 2010-12-22 18:34 ` [Bug c/47043] " steven at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: drepper.fsp at gmail dot com @ 2010-12-22 18:31 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Summary: allow deprecating enum values Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: drepper.fsp@gmail.com The deprecated is nice and it's use should be expanded. Sometimes enum values have to be deprecated and it would be useful if one could write this: enum { newval, oldval __attribute__ ((deprecated)) }; Any use of 'oldval' should provoke the usual warning. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com @ 2010-12-22 18:34 ` steven at gcc dot gnu.org 2013-01-05 23:31 ` bangerth at gmail dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: steven at gcc dot gnu.org @ 2010-12-22 18:34 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Steven Bosscher <steven at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.22 18:34:01 CC| |steven at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> 2010-12-22 18:34:01 UTC --- Interesting idea. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com 2010-12-22 18:34 ` [Bug c/47043] " steven at gcc dot gnu.org @ 2013-01-05 23:31 ` bangerth at gmail dot com 2013-01-05 23:32 ` bangerth at gmail dot com ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at gmail dot com @ 2013-01-05 23:31 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Wolfgang Bangerth <bangerth at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.h.garvin at gmail | |dot com --- Comment #2 from Wolfgang Bangerth <bangerth at gmail dot com> 2013-01-05 23:31:11 UTC --- *** Bug 45168 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com 2010-12-22 18:34 ` [Bug c/47043] " steven at gcc dot gnu.org 2013-01-05 23:31 ` bangerth at gmail dot com @ 2013-01-05 23:32 ` bangerth at gmail dot com 2015-04-30 8:19 ` mpolacek at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at gmail dot com @ 2013-01-05 23:32 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Wolfgang Bangerth <bangerth at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at gmail dot com --- Comment #3 from Wolfgang Bangerth <bangerth at gmail dot com> 2013-01-05 23:32:04 UTC --- Indeed a good idea -- I'm missing it too. For the record, clang++ accepts the code. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com ` (2 preceding siblings ...) 2013-01-05 23:32 ` bangerth at gmail dot com @ 2015-04-30 8:19 ` mpolacek at gcc dot gnu.org 2015-05-22 9:08 ` mpolacek at gcc dot gnu.org 2015-05-22 9:11 ` mpolacek at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: mpolacek at gcc dot gnu.org @ 2015-04-30 8:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |mpolacek at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Target Milestone|--- |6.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com ` (3 preceding siblings ...) 2015-04-30 8:19 ` mpolacek at gcc dot gnu.org @ 2015-05-22 9:08 ` mpolacek at gcc dot gnu.org 2015-05-22 9:11 ` mpolacek at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: mpolacek at gcc dot gnu.org @ 2015-05-22 9:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 --- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Fri May 22 09:07:31 2015 New Revision: 223527 URL: https://gcc.gnu.org/viewcvs?rev=223527&root=gcc&view=rev Log: PR c/47043 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL. * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator attributes. * cp-tree.h (build_enumerator): Update declaration. * decl.c (build_enumerator): Add attributes parameter. Call cplus_decl_attributes. * init.c (constant_value_1): Pass tf_none to mark_used. * parser.c (cp_parser_enumerator_definition): Parse attributes and pass them down to build_enumerator. * pt.c (tsubst_enum): Pass decl attributes to build_enumerator. * semantics.c (finish_id_expression): Don't warn_deprecated_use here. * doc/extend.texi (Enumerator Attributes): New section. Document syntax of enumerator attributes. * c-c++-common/attributes-enum-1.c: New test. * c-c++-common/attributes-enum-2.c: New test. * g++.dg/cpp0x/attributes-enum-1.C: New test. * g++.dg/cpp1y/attributes-enum-1.C: New test. Added: trunk/gcc/testsuite/c-c++-common/attributes-enum-1.c trunk/gcc/testsuite/c-c++-common/attributes-enum-2.c trunk/gcc/testsuite/g++.dg/cpp0x/attributes-enum-1.C trunk/gcc/testsuite/g++.dg/cpp1y/attributes-enum-1.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c/ChangeLog trunk/gcc/c/c-parser.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/init.c trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/doc/extend.texi trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/47043] allow deprecating enum values 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com ` (4 preceding siblings ...) 2015-05-22 9:08 ` mpolacek at gcc dot gnu.org @ 2015-05-22 9:11 ` mpolacek at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: mpolacek at gcc dot gnu.org @ 2015-05-22 9:11 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Done. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-22 9:11 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-12-22 18:31 [Bug c/47043] New: allow deprecating enum values drepper.fsp at gmail dot com 2010-12-22 18:34 ` [Bug c/47043] " steven at gcc dot gnu.org 2013-01-05 23:31 ` bangerth at gmail dot com 2013-01-05 23:32 ` bangerth at gmail dot com 2015-04-30 8:19 ` mpolacek at gcc dot gnu.org 2015-05-22 9:08 ` mpolacek at gcc dot gnu.org 2015-05-22 9:11 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).