public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/47043] allow deprecating enum values
Date: Fri, 22 May 2015 09:08:00 -0000	[thread overview]
Message-ID: <bug-47043-4-GCpKApSci7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47043-4@http.gcc.gnu.org/bugzilla/>

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


  parent reply	other threads:[~2015-05-22  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 18:31 [Bug c/47043] New: " 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 [this message]
2015-05-22  9:11 ` mpolacek at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47043-4-GCpKApSci7@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).