From: Jakub Jelinek <jakub@redhat.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: Martin Sebor <msebor@gmail.com>, Jason Merrill <jason@redhat.com>,
Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 5/3] C++ bits to improve detection of attribute conflicts (PR 81544)
Date: Fri, 08 Dec 2017 11:31:00 -0000 [thread overview]
Message-ID: <20171208113057.GR2353@tucnak> (raw)
In-Reply-To: <ydd8tedh5m1.fsf@CeBiTec.Uni-Bielefeld.DE>
On Fri, Dec 08, 2017 at 11:32:54AM +0100, Rainer Orth wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
> > On Fri, Dec 08, 2017 at 10:43:58AM +0100, Rainer Orth wrote:
> >> The line numbers are completely misleading, unfortunately. Hadn't
> >> SUBTARGET_ATTRIBUTE_TABLE been used at the end of the (very short)
> >> sparc_attribute_table, I wouldn't have seen what was wrong.
> >>
> >> The following patch fixes the problem, installed on mainline after
> >> i386-pc-solaris2.11 and sparc-sun-solaris2.11 bootstraps completed
> >> without regressions.
> >>
> >> However, there are two more SUBTARGET_ATTRIBUTE_TABLE defines:
> >>
> >> gcc/config/darwin.h:#define SUBTARGET_ATTRIBUTE_TABLE \
> >> gcc/config/i386/cygming.h:#define SUBTARGET_ATTRIBUTE_TABLE \
> >
> > I'll deal with this.
>
> This is what I'm currently testing with an x86_64-apple-darwin11.4.2
> bootstrap. Ok if it passes?
I've committed this instead, while only darwin.h and cygming.h were left
broken, the comments haven't been adjusted in many more cases.
BTW, we should swap handler and affects_type_identity fields at some point,
3 bools, then pointer, then bool, then pointer needs quite a lot of padding.
2017-12-08 Jakub Jelinek <jakub@redhat.com>
* config/arc/arc.c (arc_attribute_table): Add exclusions to
the comment.
* config/avr/avr.c (avr_attribute_table): Likewise.
* config/msp430/msp430.c (msp430_attribute_table): Likewise.
* config/rl78/rl78.c (rl78_attribute_table): Likewise.
* config/nds32/nds32.c (nds32_attribute_table): Likewise.
* config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
of struct attribute_spec.
* config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
ada/
* gcc-interface/utils.c (gnat_internal_attribute_table): Add
exclusions to the comment.
brig/
* brig-lang.c (brig_attribute_table): Fix up comment.
--- gcc/config/arc/arc.c.jj 2017-12-07 18:05:03.000000000 +0100
+++ gcc/config/arc/arc.c 2017-12-08 11:20:24.605501619 +0100
@@ -218,7 +218,7 @@ static tree arc_handle_fndecl_attribute
const struct attribute_spec arc_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- affects_type_identity } */
+ affects_type_identity, exclusions } */
{ "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute,
true, NULL },
/* Function calls made to this symbol must be done indirectly, because
--- gcc/config/avr/avr.c.jj 2017-12-07 18:05:02.000000000 +0100
+++ gcc/config/avr/avr.c 2017-12-08 11:24:32.270391537 +0100
@@ -9875,7 +9875,7 @@ static const struct attribute_spec
avr_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- affects_type_identity } */
+ affects_type_identity, exclusions } */
{ "progmem", 0, 0, false, false, false, avr_handle_progmem_attribute,
false, NULL },
{ "signal", 0, 0, true, false, false, avr_handle_fndecl_attribute,
--- gcc/config/darwin.h.jj 2017-11-28 12:11:41.000000000 +0100
+++ gcc/config/darwin.h 2017-12-08 11:18:05.866243854 +0100
@@ -741,11 +741,11 @@ extern GTY(()) section * darwin_sections
/* Extra attributes for Darwin. */
#define SUBTARGET_ATTRIBUTE_TABLE \
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, \
- affects_type_identity } */ \
+ affects_type_identity, exclusions } */ \
{ "apple_kext_compatibility", 0, 0, false, true, false, \
- darwin_handle_kext_attribute, false }, \
+ darwin_handle_kext_attribute, false, NULL }, \
{ "weak_import", 0, 0, true, false, false, \
- darwin_handle_weak_import_attribute, false }
+ darwin_handle_weak_import_attribute, false, NULL }
/* Make local constant labels linker-visible, so that if one follows a
weak_global constant, ld64 will be able to separate the atoms. */
--- gcc/config/i386/cygming.h.jj 2017-10-30 12:02:35.000000000 +0100
+++ gcc/config/i386/cygming.h 2017-12-08 11:25:12.372887945 +0100
@@ -448,9 +448,9 @@ do { \
#define SUBTARGET_ATTRIBUTE_TABLE \
{ "selectany", 0, 0, true, false, false, ix86_handle_selectany_attribute, \
- false }
+ false, NULL }
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- affects_type_identity } */
+ affects_type_identity, exclusions } */
/* mcount() does not need a counter variable. */
#undef NO_PROFILE_COUNTERS
--- gcc/config/msp430/msp430.c.jj 2017-12-07 18:05:03.000000000 +0100
+++ gcc/config/msp430/msp430.c 2017-12-08 11:26:47.634691684 +0100
@@ -2050,7 +2050,7 @@ msp430_data_attr (tree * node,
const struct attribute_spec msp430_attribute_table[] =
{
/* Name min_num_args type_req, affects_type_identity
- max_num_args, fn_type_req
+ max_num_args, fn_type_req exclusions
decl_req handler. */
{ ATTR_INTR, 0, 1, true, false, false, msp430_attr, false, NULL },
{ ATTR_NAKED, 0, 0, true, false, false, msp430_attr, false, NULL },
--- gcc/config/rl78/rl78.c.jj 2017-12-07 18:05:03.000000000 +0100
+++ gcc/config/rl78/rl78.c 2017-12-08 11:27:25.024222160 +0100
@@ -858,7 +858,7 @@ rl78_handle_saddr_attribute (tree * node
const struct attribute_spec rl78_attribute_table[] =
{
/* Name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- affects_type_identity. */
+ affects_type_identity, exclusions. */
{ "interrupt", 0, 0, true, false, false, rl78_handle_func_attribute,
false, NULL },
{ "brk_interrupt", 0, 0, true, false, false, rl78_handle_func_attribute,
--- gcc/config/nds32/nds32.c.jj 2017-12-07 18:05:02.000000000 +0100
+++ gcc/config/nds32/nds32.c 2017-12-08 11:27:54.160856273 +0100
@@ -83,7 +83,8 @@ static const char * const nds32_intrinsi
static const struct attribute_spec nds32_attribute_table[] =
{
/* Syntax: { name, min_len, max_len, decl_required, type_required,
- function_type_required, handler, affects_type_identity } */
+ function_type_required, handler, affects_type_identity,
+ exclusions } */
/* The interrupt vid: [0-63]+ (actual vector number starts from 9 to 72). */
{ "interrupt", 1, 64, false, false, false, NULL, false, NULL },
--- gcc/ada/gcc-interface/utils.c.jj 2017-12-07 18:04:59.000000000 +0100
+++ gcc/ada/gcc-interface/utils.c 2017-12-08 11:29:11.796881349 +0100
@@ -108,7 +108,7 @@ static tree fake_attribute_handler (tree
const struct attribute_spec gnat_internal_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- affects_type_identity } */
+ affects_type_identity, exclusions } */
{ "const", 0, 0, true, false, false, handle_const_attribute,
false, NULL },
{ "nothrow", 0, 0, true, false, false, handle_nothrow_attribute,
--- gcc/brig/brig-lang.c.jj 2017-12-07 18:04:55.000000000 +0100
+++ gcc/brig/brig-lang.c 2017-12-08 12:20:40.475998143 +0100
@@ -448,7 +448,7 @@ brig_localize_identifier (const char *id
const struct attribute_spec brig_attribute_table[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
- do_diagnostic } */
+ affects_type_identity, exclusions } */
{ "leaf", 0, 0, true, false, false,
handle_leaf_attribute, false, NULL },
{ "const", 0, 0, true, false, false,
Jakub
next prev parent reply other threads:[~2017-12-08 11:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 16:14 [PATCH 0/3] " Martin Sebor
2017-08-16 23:00 ` [PATCH 4/3] " Martin Sebor
2017-08-18 14:06 ` Jonathan Wakely
2017-08-17 6:41 ` [PATCH 5/3] C++ bits to " Martin Sebor
2017-08-23 5:15 ` Jason Merrill
2017-08-23 15:30 ` Martin Sebor
2017-12-03 14:59 ` Martin Sebor
2017-12-05 3:21 ` Jason Merrill
2017-12-08 9:44 ` Rainer Orth
2017-12-08 10:13 ` Jakub Jelinek
2017-12-08 10:33 ` Rainer Orth
2017-12-08 11:31 ` Jakub Jelinek [this message]
2017-12-08 16:00 ` Martin Sebor
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=20171208113057.GR2353@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=msebor@gmail.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/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).