public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/25325] enum class inherited from typedef of unsigned type does not handle values with high bit set
Date: Fri, 03 Apr 2020 20:13:39 +0000	[thread overview]
Message-ID: <bug-25325-4717-3ev24SW2Xm@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25325-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hannes Domani <ssbssa@sourceware.org>:

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

commit 9e7c9a03eefafae549dafa8bec13232a780804ef
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Fri Apr 3 21:38:31 2020 +0200

    Fix attributes of typed enums of typedefs

    For this enum:
    typedef unsigned char byte;
    enum byte_enum : byte
    {
      byte_val = 128
    };

    The unsigned attribute is not set:
    (gdb) p byte_val
    $1 = -128

    That's because it uses the attributes of the 'byte' typedef for the enum.
    So this changes it to use the attributes of the underlying 'unsigned char'
    instead.

    gdb/ChangeLog:

    2020-04-03  Hannes Domani  <ssbssa@yahoo.de>

            PR gdb/25325
            * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.

    gdb/testsuite/ChangeLog:

    2020-04-03  Hannes Domani  <ssbssa@yahoo.de>

            PR gdb/25325
            * gdb.cp/typed-enum.cc: New test.
            * gdb.cp/typed-enum.exp: New file.

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

  parent reply	other threads:[~2020-04-03 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-25325-4717@http.sourceware.org/bugzilla/>
2020-04-03 19:57 ` ssbssa at sourceware dot org
2020-04-03 20:13 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-03 20:15 ` ssbssa at sourceware dot 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-25325-4717-3ev24SW2Xm@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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).