diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-04-03 21:38:31 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-04-03 22:09:54 +0200 |
commit | 9e7c9a03eefafae549dafa8bec13232a780804ef (patch) | |
tree | 4e199f3c1b8691c463c67b509e2a492dc3b59894 /gdb/sparc-nbsd-tdep.c | |
parent | d9e49b61691f384447242f54c996fe80ef9bf184 (diff) | |
download | binutils-9e7c9a03eefafae549dafa8bec13232a780804ef.zip binutils-9e7c9a03eefafae549dafa8bec13232a780804ef.tar.gz binutils-9e7c9a03eefafae549dafa8bec13232a780804ef.tar.bz2 |
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.
Diffstat (limited to 'gdb/sparc-nbsd-tdep.c')
0 files changed, 0 insertions, 0 deletions