Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-04-04 Thread Jeff Law
On 3/21/19 3:59 PM, Martin Sebor wrote: > On 3/19/19 9:33 PM, Jeff Law wrote: >> On 3/19/19 8:22 PM, Joseph Myers wrote: >>> On Tue, 19 Mar 2019, Jeff Law wrote: >>> I'll note that our documentation clearly states that attributes can be applied to functions, variables, labels, enums, stat

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Martin Sebor
On 3/21/19 5:05 PM, Martin Sebor wrote: On 3/21/19 4:25 PM, Jakub Jelinek wrote: On Thu, Mar 21, 2019 at 04:19:37PM -0600, Martin Sebor wrote: Say that the argument is either a type or an expression that is either an identifier (for C++ id-expression) to cover 1) and a postfix expression with .

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Martin Sebor
On 3/21/19 4:25 PM, Jakub Jelinek wrote: On Thu, Mar 21, 2019 at 04:19:37PM -0600, Martin Sebor wrote: Say that the argument is either a type or an expression that is either an identifier (for C++ id-expression) to cover 1) and a postfix expression with . or -> operator (to cover COMPONENT_REF)?

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Jakub Jelinek
On Thu, Mar 21, 2019 at 04:19:37PM -0600, Martin Sebor wrote: > > Say that the argument is either a type or an expression that is > > either an identifier (for C++ id-expression) to cover 1) and > > a postfix expression with . or -> operator (to cover COMPONENT_REF)? > > That doesn't look easy to

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Martin Sebor
On 3/21/19 4:13 PM, Jakub Jelinek wrote: On Thu, Mar 21, 2019 at 03:59:55PM -0600, Martin Sebor wrote: 1) either an identifier naming a function or variable, or 2) some other expression like a member reference via . or ->, an array subscript, or the indirection expression *. But GCC disting

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Jakub Jelinek
On Thu, Mar 21, 2019 at 03:59:55PM -0600, Martin Sebor wrote: > 1) either an identifier naming a function or variable, or > 2) some other expression like a member reference via . or ->, >an array subscript, or the indirection expression *. > > But GCC distinguishes three kinds of arguments: >

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-21 Thread Martin Sebor
On 3/19/19 9:33 PM, Jeff Law wrote: On 3/19/19 8:22 PM, Joseph Myers wrote: On Tue, 19 Mar 2019, Jeff Law wrote: I'll note that our documentation clearly states that attributes can be applied to functions, variables, labels, enums, statements and types. A key thing here is that they can be a

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-19 Thread Jeff Law
On 3/19/19 8:22 PM, Joseph Myers wrote: > On Tue, 19 Mar 2019, Jeff Law wrote: > >> I'll note that our documentation clearly states that attributes can be >> applied to functions, variables, labels, enums, statements and types. > > A key thing here is that they can be applied to fields - that is,

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-19 Thread Joseph Myers
On Tue, 19 Mar 2019, Jeff Law wrote: > I'll note that our documentation clearly states that attributes can be > applied to functions, variables, labels, enums, statements and types. A key thing here is that they can be applied to fields - that is, they can be properties of a FIELD_DECL. Referri

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-19 Thread Martin Sebor
On 3/19/19 12:30 PM, Jeff Law wrote: On 2/22/19 9:42 AM, Marek Polacek wrote: On Thu, Feb 21, 2019 at 03:39:21PM -0700, Martin Sebor wrote: On 2/21/19 1:27 PM, Jeff Law wrote: On 2/21/19 1:12 PM, Martin Sebor wrote: On 2/21/19 12:08 PM, Jeff Law wrote: On 2/18/19 7:53 PM, Martin Sebor wrote:

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-03-19 Thread Jeff Law
On 2/22/19 9:42 AM, Marek Polacek wrote: > On Thu, Feb 21, 2019 at 03:39:21PM -0700, Martin Sebor wrote: >> On 2/21/19 1:27 PM, Jeff Law wrote: >>> On 2/21/19 1:12 PM, Martin Sebor wrote: On 2/21/19 12:08 PM, Jeff Law wrote: > On 2/18/19 7:53 PM, Martin Sebor wrote: >> Please let me kn

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-22 Thread Martin Sebor
I already explained the rationale behind the decision to have the built-in accept expressions: to be able to easily query for type attributes in expressions such as: typedef __attribute__ ((may_alias)) int* BadInt; void f (BadInt *p) { _Static_assert (__builtin_has_attribute (*p, m

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-22 Thread Marek Polacek
On Thu, Feb 21, 2019 at 03:39:21PM -0700, Martin Sebor wrote: > On 2/21/19 1:27 PM, Jeff Law wrote: > > On 2/21/19 1:12 PM, Martin Sebor wrote: > > > On 2/21/19 12:08 PM, Jeff Law wrote: > > > > On 2/18/19 7:53 PM, Martin Sebor wrote: > > > > > Please let me know what it will take to get the fix fo

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Martin Sebor
On 2/21/19 3:42 PM, Jeff Law wrote: On 2/21/19 3:39 PM, Martin Sebor wrote: On 2/21/19 1:27 PM, Jeff Law wrote: On 2/21/19 1:12 PM, Martin Sebor wrote: On 2/21/19 12:08 PM, Jeff Law wrote: On 2/18/19 7:53 PM, Martin Sebor wrote: Please let me know what it will take to get the fix for these t

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Jeff Law
On 2/21/19 3:39 PM, Martin Sebor wrote: > On 2/21/19 1:27 PM, Jeff Law wrote: >> On 2/21/19 1:12 PM, Martin Sebor wrote: >>> On 2/21/19 12:08 PM, Jeff Law wrote: On 2/18/19 7:53 PM, Martin Sebor wrote: > Please let me know what it will take to get the fix for these two > issues approve

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Martin Sebor
On 2/21/19 1:27 PM, Jeff Law wrote: On 2/21/19 1:12 PM, Martin Sebor wrote: On 2/21/19 12:08 PM, Jeff Law wrote: On 2/18/19 7:53 PM, Martin Sebor wrote: Please let me know what it will take to get the fix for these two issues approved.  I've answered the questions so I don't know what else I'm

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Jeff Law
On 2/21/19 1:12 PM, Martin Sebor wrote: > On 2/21/19 12:08 PM, Jeff Law wrote: >> On 2/18/19 7:53 PM, Martin Sebor wrote: >>> Please let me know what it will take to get the fix for these two >>> issues approved.  I've answered the questions so I don't know what >>> else I'm expected to do here. >>

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Martin Sebor
On 2/21/19 12:08 PM, Jeff Law wrote: On 2/18/19 7:53 PM, Martin Sebor wrote: Please let me know what it will take to get the fix for these two issues approved.  I've answered the questions so I don't know what else I'm expected to do here.   https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00793.

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-21 Thread Jeff Law
On 2/18/19 7:53 PM, Martin Sebor wrote: > Please let me know what it will take to get the fix for these two > issues approved.  I've answered the questions so I don't know what > else I'm expected to do here. > >   https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00793.html I think there is still a f

PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-18 Thread Martin Sebor
Please let me know what it will take to get the fix for these two issues approved. I've answered the questions so I don't know what else I'm expected to do here. https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00793.html On 2/11/19 12:20 PM, Martin Sebor wrote: This is a repost of a patch for

Re: [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-11 Thread Martin Sebor
On 2/11/19 1:23 PM, Jakub Jelinek wrote: On Mon, Feb 11, 2019 at 12:20:42PM -0700, Martin Sebor wrote: --- gcc/c-family/c-attribs.c(revision 268774) +++ gcc/c-family/c-attribs.c(working copy) @@ -4032,8 +4032,12 @@ validate_attribute (location_t atloc, tree oper, t if (TYPE_P (ope

Re: [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-11 Thread Jakub Jelinek
On Mon, Feb 11, 2019 at 12:20:42PM -0700, Martin Sebor wrote: > --- gcc/c-family/c-attribs.c (revision 268774) > +++ gcc/c-family/c-attribs.c (working copy) > @@ -4032,8 +4032,12 @@ validate_attribute (location_t atloc, tree oper, t > >if (TYPE_P (oper)) > tmpdecl = build_decl (atloc,

Re: [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-11 Thread Jakub Jelinek
On Mon, Feb 11, 2019 at 12:20:42PM -0700, Martin Sebor wrote: > This is a repost of a patch for PR 88383 updated to also fix the just > reported PR 89288 (the original patch only partially handles this case). > The review of the first patch was derailed by questions about the design > of the built-

[PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-02-11 Thread Martin Sebor
This is a repost of a patch for PR 88383 updated to also fix the just reported PR 89288 (the original patch only partially handles this case). The review of the first patch was derailed by questions about the design of the built-in so the fix for the ICE was never approved. I think the ICEs shoul