This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PING] [PATCH] Make C++ honor the enum mode attribute
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Sat, 7 May 2016 09:54:56 +0000
- Subject: [PING] [PATCH] Make C++ honor the enum mode attribute
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=softfail (sender IP is 25.152.4.59) smtp.mailfrom=hotmail.de; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=hotmail.de;
- References: <AM4PR07MB157101EF27A6DA225D3789E8E4670 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com>
Ping..
For this patch: https://gcc.gnu.org/ml/gcc-patches/2016-04/msg02069.html
Thanks
Bernd.
On 04/30/16 07:54, Bernd Edlinger wrote:
> Hi,
>
> this was already posted in february, but has not yet been reviewed, so I thought
> it is time now to post it again...
>
> As a follow-up for Jakub's c/69669 fix, I'd like to have the enum mode also honored
> in C++ code, because the mode attribute now finally really works in C, but it is
> completely and silently(!) ignored by C++ code, which results in incompatible
> code.
>
> So I duplicated what is done in c/c-decl.c also in cp/decl.c. That worked
> immediately, except that it is not possible to explicitly check the "mode"
> attribute in the TYPE_ATTRIBUTES (enumtype) because that attribute
> is never copied to the type, and the original attribute list is not available
> here. That should be OK, as this check was added to fix pr52085 which
> does not apply here, because C++ does not support enum forward
> declarations.
>
> If that patch is not appropriate for stage 4, I would at least want to emit
> an attribute directive ignored warning in c++ mode. I think that could
> be done in handle_mode_attribute. But fixing that feature is cooler.
>
>
> Boot-strapped and regression tested on x86_64-pc-linux-gnu.
> Ok for trunk and gcc-6 branch?
>
>
> Thanks
> Bernd.
>