public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15246] New: no support for c++11 "enum class"
@ 2013-03-07 16:15 tromey at redhat dot com
  2013-03-07 16:16 ` [Bug c++/15246] " tromey at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2013-03-07 16:15 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15246

             Bug #: 15246
           Summary: no support for c++11 "enum class"
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tromey@redhat.com
    Classification: Unclassified


gdb doesn't have support for the c++11 "enum class"
feature, or DW_AT_enum_class.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15246] no support for c++11 "enum class"
  2013-03-07 16:15 [Bug c++/15246] New: no support for c++11 "enum class" tromey at redhat dot com
@ 2013-03-07 16:16 ` tromey at redhat dot com
  2014-03-27 18:05 ` tromey at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2013-03-07 16:16 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=15246

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |http://gcc.gnu.org/bugzilla
                   |                            |/show_bug.cgi?id=16063

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2013-03-07 16:16:44 UTC ---
See linked g++ bug as well.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15246] no support for c++11 "enum class"
  2013-03-07 16:15 [Bug c++/15246] New: no support for c++11 "enum class" tromey at redhat dot com
  2013-03-07 16:16 ` [Bug c++/15246] " tromey at redhat dot com
@ 2014-03-27 18:05 ` tromey at redhat dot com
  2014-04-14 18:11 ` cvs-commit at gcc dot gnu.org
  2014-04-14 18:13 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2014-03-27 18:05 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15246

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |tromey at redhat dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15246] no support for c++11 "enum class"
  2013-03-07 16:15 [Bug c++/15246] New: no support for c++11 "enum class" tromey at redhat dot com
  2013-03-07 16:16 ` [Bug c++/15246] " tromey at redhat dot com
  2014-03-27 18:05 ` tromey at redhat dot com
@ 2014-04-14 18:11 ` cvs-commit at gcc dot gnu.org
  2014-04-14 18:13 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-04-14 18:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15246

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  3d567982aca11c85a7fa31f13046de3271d3afc8 (commit)
       via  c848d64244912f9f411bec7b1c045bf14c72b61b (commit)
       via  0626fc76d1b95c1c5b158a9b0be17791aa9078f8 (commit)
      from  dca325b370730f8cfd3b63ac848569bf58d8746c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3d567982aca11c85a7fa31f13046de3271d3afc8

commit 3d567982aca11c85a7fa31f13046de3271d3afc8
Author: Tom Tromey <tromey@redhat.com>
Date:   Thu Mar 27 12:24:27 2014 -0600

    implement support for "enum class"

    This adds support for the C++11 "enum class" feature.  This is
    PR c++/15246.

    I chose to use the existing TYPE_DECLARED_CLASS rather than introduce
    a new type code.  This seemed both simple and clear to me.

    I made overloading support for the new enum types strict.  This is how
    it works in C++; and it didn't seem like an undue burden to keep this,
    particularly because enum constants are printed symbolically by gdb.

    Built and regtested on x86-64 Fedora 20.

    2014-04-14  Tom Tromey  <tromey@redhat.com>

        PR c++/15246:
        * c-exp.y (type_aggregate_p): New function.
        (qualified_name, classify_inner_name): Use it.
        * c-typeprint.c (c_type_print_base): Handle TYPE_DECLARED_CLASS
        and TYPE_TARGET_TYPE of an enum type.
        * dwarf2read.c (read_enumeration_type): Set TYPE_DECLARED_CLASS on
        an enum type.
        (determine_prefix) <case DW_TAG_enumeration_type>: New case;
        handle TYPE_DECLARED_CLASS.
        * gdbtypes.c (rank_one_type): Handle TYPE_DECLARED_CLASS on enum
        types.
        * gdbtypes.h (TYPE_DECLARED_CLASS): Update comment.
        * valops.c (enum_constant_from_type): New function.
        (value_aggregate_elt): Use it.
        * cp-namespace.c (cp_lookup_nested_symbol): Handle
        TYPE_CODE_ENUM.

    2014-04-14  Tom Tromey  <tromey@redhat.com>

        * gdb.cp/classes.exp (test_enums): Handle underlying type.
        * gdb.dwarf2/enum-type.exp: Add test for enum with underlying
        type.
        * gdb.cp/enum-class.exp: New file.
        * gdb.cp/enum-class.cc: New file.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c848d64244912f9f411bec7b1c045bf14c72b61b

commit c848d64244912f9f411bec7b1c045bf14c72b61b
Author: Tom Tromey <tromey@redhat.com>
Date:   Thu Mar 27 12:16:38 2014 -0600

    constify value_aggregate_elt

    While working on another patch I realized that value_aggregate_elt's
    "name" parameter ought to be const.  This patch implements this.

    2014-04-14  Tom Tromey  <tromey@redhat.com>

        * valops.c (value_aggregate_elt, value_struct_elt_for_reference)
        (value_namespace_elt, value_maybe_namespace_elt): Make "name"
        const.
        * value.h (value_aggregate_elt): Update.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0626fc76d1b95c1c5b158a9b0be17791aa9078f8

commit 0626fc76d1b95c1c5b158a9b0be17791aa9078f8
Author: Tom Tromey <tromey@redhat.com>
Date:   Wed Mar 26 08:54:56 2014 -0600

    handle DW_AT_type on an enumeration

    DWARF allows an enumeration type to have a DW_AT_type.  GDB doesn't
    recognize this, but there is a patch to change GCC to emit it, and a
    DWARF proposal to further allow an enum type with a DW_AT_type to omit
    the DW_AT_byte_size.  This patch changes gdb to implement this.

    Built and regtested on x86-64 Fedora 20.

    2014-04-14  Tom Tromey  <tromey@redhat.com>

        * dwarf2read.c (read_enumeration_type): Handle DW_AT_type.

    2014-04-14  Tom Tromey  <tromey@redhat.com>

        * gdb.dwarf2/enum-type.exp: New file.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                          |   30 ++++++++++++
 gdb/c-exp.y                            |   26 +++++++----
 gdb/c-typeprint.c                      |   19 +++++++
 gdb/cp-namespace.c                     |    1 +
 gdb/dwarf2read.c                       |   37 ++++++++++++++-
 gdb/gdbtypes.c                         |    6 ++
 gdb/gdbtypes.h                         |    6 ++-
 gdb/testsuite/ChangeLog                |   12 +++++
 gdb/testsuite/gdb.cp/classes.exp       |    2 +-
 gdb/testsuite/gdb.cp/enum-class.cc     |   46 ++++++++++++++++++
 gdb/testsuite/gdb.cp/enum-class.exp    |   48 +++++++++++++++++++
 gdb/testsuite/gdb.dwarf2/enum-type.exp |   81 ++++++++++++++++++++++++++++++++
 gdb/valops.c                           |   54 ++++++++++++++++++---
 gdb/value.h                            |    2 +-
 14 files changed, 349 insertions(+), 21 deletions(-)
 create mode 100644 gdb/testsuite/gdb.cp/enum-class.cc
 create mode 100644 gdb/testsuite/gdb.cp/enum-class.exp
 create mode 100644 gdb/testsuite/gdb.dwarf2/enum-type.exp

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/15246] no support for c++11 "enum class"
  2013-03-07 16:15 [Bug c++/15246] New: no support for c++11 "enum class" tromey at redhat dot com
                   ` (2 preceding siblings ...)
  2014-04-14 18:11 ` cvs-commit at gcc dot gnu.org
@ 2014-04-14 18:13 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2014-04-14 18:13 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=15246

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |7.8

--- Comment #3 from Tom Tromey <tromey at redhat dot com> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-14 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-07 16:15 [Bug c++/15246] New: no support for c++11 "enum class" tromey at redhat dot com
2013-03-07 16:16 ` [Bug c++/15246] " tromey at redhat dot com
2014-03-27 18:05 ` tromey at redhat dot com
2014-04-14 18:11 ` cvs-commit at gcc dot gnu.org
2014-04-14 18:13 ` tromey at redhat dot com

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).