public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simark@simark.ca>, Tom Tromey <tromey@adacore.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] Increase size of main_type::nfields
Date: Fri, 13 Jan 2023 12:53:55 +0000	[thread overview]
Message-ID: <c4966d73-b9ce-cf62-e5cc-5e3083323102@palves.net> (raw)
In-Reply-To: <061d47f1-fbe7-4d2f-6919-811061d0be9b@simark.ca>

On 2023-01-11 9:02 p.m., Simon Marchi via Gdb-patches wrote:
> 
> On 1/11/23 15:44, Tom Tromey via Gdb-patches wrote:
>> main_type::nfields is a 'short', and has been for many years.  PR
>> c++/29985 points out that 'short' is too narrow for an enum that
>> contains more than 2^15 constants.
>>
>> This patch bumps the size of 'nfields'.  To verify that the field
>> isn't directly used, it is also renamed.  Note that this does not
>> affect the size of main_type on x86-64 Fedora 36.  And, if it does
>> have a negative effect somewhere, it's worth considering that types
>> could be shrunk more drastically by using subclasses for the different
>> codes.
>>
>> I wasn't sure whether a test case for this would be desirable.  It
>> would be a bit large.
> We could make a test case that generates a source file on the fly in
> standard_output_directory and compiles it.
> 

+1


  parent reply	other threads:[~2023-01-13 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 20:44 Tom Tromey
2023-01-11 21:02 ` Simon Marchi
2023-01-11 21:28   ` Tom Tromey
2023-01-11 22:33     ` Simon Marchi
2023-01-12 19:14       ` Tom Tromey
2023-01-13 12:53   ` Pedro Alves [this message]
2023-01-27 14:49     ` Tom Tromey
2023-01-27 15:13   ` Tom Tromey

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=c4966d73-b9ce-cf62-e5cc-5e3083323102@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=tromey@adacore.com \
    /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).