This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING] [C++ Patch] PR 82307
- From: Mukesh Kapoor <mukesh dot kapoor at oracle dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: nathan at acm dot org
- Date: Wed, 18 Oct 2017 09:17:58 -0700
- Subject: Re: [PING] [C++ Patch] PR 82307
- Authentication-results: sourceware.org; auth=none
- References: <906899ba-66bc-a8c7-1554-5c3b1a330098@oracle.com>
On 10/9/2017 12:20 PM, Mukesh Kapoor wrote:
Hi,
This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82307.
For an unscoped enum with a fixed underlying type, the function
type_promotes_to() does not always return the same type as the
underlying type. The fix is to use the underlying type of the enum
instead of creating a new one by calling c_common_type_for_size().
Bootstrapped and tested with 'make check' on x86_64-linux. New test
case added.
Mukesh