From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1052 invoked by alias); 14 Apr 2014 18:11:36 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 1027 invoked by uid 55); 14 Apr 2014 18:11:34 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug c++/15246] no support for c++11 "enum class" Date: Mon, 14 Apr 2014 18:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q2/txt/msg00054.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15246 --- Comment #2 from 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 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 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) : 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 * 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 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 * 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 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 * dwarf2read.c (read_enumeration_type): Handle DW_AT_type. 2014-04-14 Tom Tromey * 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.