From patchwork Fri Oct 7 21:08:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 1824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp489810wrs; Fri, 7 Oct 2022 14:09:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM41Ub0+oc8v26+E73KoBnHpwKNwX5ymFyTnaquijIl+jQL2YjsYUagFshi5LXRWZL6J2+Em X-Received: by 2002:a17:907:6d89:b0:783:5465:908 with SMTP id sb9-20020a1709076d8900b0078354650908mr5827640ejc.26.1665176953870; Fri, 07 Oct 2022 14:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665176953; cv=none; d=google.com; s=arc-20160816; b=zMIJWiu0E2u34OjKLp+r/dypqQPHTSC3xpeUgxlzMBj7MkfydJsnoXV+4qokaM19kr HvXI4lYtm339XEPnY5zoWr+tInK3Xs1QDh0jbfXkqXsf103uuZ1oaYuThCgzUgfXjHSq 7X1ki8qaZl5rS0msawBzYLkPNTVYGs3Gaz+9iwsWOLZyV++mwutG7xnaSrlmFTfzIYVx X5O/SmKfty4sGinIW9rFAbn1oqfgsx9iryiNNdr16Hu3JeuNuhYJ/pPNSwqso9aSTnGi lEeK1ki3uUNA8umNpDCo+3LTUk9qPgc+P5VJ8ipKiYmuH+zpu70J3DuiXjHzBRa1iwOi wZew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-disposition:user-agent:in-reply-to:mime-version:references :message-id:subject:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=bodLWk21ISai8/Bmj9HSpB6WW/ZM1KVi8rCRbTQAfLE=; b=z3sAce2mm2yhd5sjFmlonPocTSm7jxUFGW+XwdyBdQRMlAiPb7IZMEh55ymO6mizGT 7sFepgfT+QHvu7dwNScbJTjO0E7oJDnUWAFg4RfIo7NYQLzzpKmtAlp/uKrbCo4ORBrv b4iv1F0Krdx8w4N77Vej+TNCKMRAu+V8aSZ5IZpp88CXOEm7IdZdfLiuoCtMGkN5F3eE SORE7Piqa/Gv1Pu4yEKbl3Z993g+1GS+YuGRIPPJQcFabGJqE3Xr85I/2TUWFYkch1uo Tgq8EsXn4h0v5AoL5iyQKi9tTw0AIWoCjucm3F/rVMzvBUgXAmklULTOZPv5pTk3v06w 0Wjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IFwX9bpQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id jg26-20020a170907971a00b0078cb8b09d34si3903901ejc.216.2022.10.07.14.09.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 14:09:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=IFwX9bpQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 790123857B9A for ; Fri, 7 Oct 2022 21:09:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 790123857B9A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665176952; bh=bodLWk21ISai8/Bmj9HSpB6WW/ZM1KVi8rCRbTQAfLE=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=IFwX9bpQ5YadMz0wRzlGpfl6Q+e/9TMSPYNR7kgQcutQ0jX7np05gktMXt+ND9nFD NJtrrYcEl31OXZHYbcJcBZ2gCuQ7G1YB3jnzXE2OZtR2/4h4Gsp6SCz2lR4oDnN/f8 P9e60Heibm9ye76Fc9cI3XUPA0iRLJuEko1hZaHU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4194A384D146 for ; Fri, 7 Oct 2022 21:08:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4194A384D146 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-312-7dNnszDwMt2QaAtbFoHnhg-1; Fri, 07 Oct 2022 17:08:26 -0400 X-MC-Unique: 7dNnszDwMt2QaAtbFoHnhg-1 Received: by mail-qk1-f198.google.com with SMTP id bl17-20020a05620a1a9100b006cdf19243acso4634621qkb.4 for ; Fri, 07 Oct 2022 14:08:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bodLWk21ISai8/Bmj9HSpB6WW/ZM1KVi8rCRbTQAfLE=; b=QExeFmXFKuhUrRSaWu7u/636xpj8/7sTkWG6ZDCBKkCmS/E1QM1UFgKI3N/eIWssjB nIBTKdALEA+TC2Fpo9Va4hzLm3LnYKR7qw0hgTsl8kYBd6JHRW/j/fevb+67GYc4pw66 bHkiDtFLhmiYcWp4+5CU2y8eRqVjdCPTmNVxTbd/dZVE5SZ9K5mXD9eOzHVoNFe3Azyw IzZmgTmupnNJJDIXWMVjKsI6xR6sdFA6H9bKr7DjIRgKJpLUYBtSYt44ajRD2SZR/Bfs FM7rWMM8ZMfI9u16K58LjwcePT+6qIeN/TTJBBNVUn4hQQUDbQNZYMHB4agVunWAetKZ AF4Q== X-Gm-Message-State: ACrzQf2JK2O1/DQLViCRsUB7T/lq1i7arS6tlJsfm3QglZnA2iYHrWLS hC5Uk0mtWM2tuOKcUGh2ygJbPq48CARvYM+hAuxfG0LfT9kZPytDM1L8dMGpg+N6WS/cKSw85zT Pz+Zg2pTqifsY9MXBng== X-Received: by 2002:ad4:574c:0:b0:4b1:87b5:c0dd with SMTP id q12-20020ad4574c000000b004b187b5c0ddmr6083027qvx.68.1665176905058; Fri, 07 Oct 2022 14:08:25 -0700 (PDT) X-Received: by 2002:ad4:574c:0:b0:4b1:87b5:c0dd with SMTP id q12-20020ad4574c000000b004b187b5c0ddmr6083005qvx.68.1665176904756; Fri, 07 Oct 2022 14:08:24 -0700 (PDT) Received: from redhat.com (2603-7000-9500-2e39-0000-0000-0000-1db4.res6.spectrum.com. [2603:7000:9500:2e39::1db4]) by smtp.gmail.com with ESMTPSA id j10-20020ac806ca000000b00359961365f1sm2730073qth.68.2022.10.07.14.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 14:08:23 -0700 (PDT) Date: Fri, 7 Oct 2022 17:08:22 -0400 To: Jason Merrill Subject: [PATCH v4] c-family: ICE with [[gnu::nocf_check]] [PR106937] Message-ID: References: <20220929224945.90798-1-polacek@redhat.com> <1c85a5bf-82dd-772c-a960-75a495ded832@redhat.com> <986ebf27-6897-c762-ff5a-d82c465e61a8@redhat.com> <8c2a1cc2-444b-90be-f73b-ee5eb7cf69e6@redhat.com> MIME-Version: 1.0 In-Reply-To: <8c2a1cc2-444b-90be-f73b-ee5eb7cf69e6@redhat.com> User-Agent: Mutt/2.2.7 (2022-08-07) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Marek Polacek via Gcc-patches From: Marek Polacek Reply-To: Marek Polacek Cc: GCC Patches , Joseph Myers Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745346195308818410?= X-GMAIL-MSGID: =?utf-8?q?1746064589585305110?= On Fri, Oct 07, 2022 at 12:17:34PM -0400, Jason Merrill wrote: > On 10/6/22 22:12, Marek Polacek wrote: > > On Thu, Oct 06, 2022 at 05:42:41PM -0400, Jason Merrill wrote: > > > On 10/4/22 19:06, Marek Polacek wrote: > > > > On Fri, Sep 30, 2022 at 09:12:24AM -0400, Jason Merrill wrote: > > > > > On 9/29/22 18:49, Marek Polacek wrote: > > > > > > When getting the name of an attribute, we ought to use > > > > > > get_attribute_name, which handles both [[ ]] and __attribute__(()) > > > > > > forms. Failure to do so may result in an ICE, like here. > > > > > > > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > > > > > How do we print the attributes with this patch? Don't we also want to print > > > > > the namespace, and use [[]] in the output? > > > > > > > > Good point, however: while the testcase indeed has an attribute > > > > in the [[]] form in the typedef, here we're printing its "aka": > > > > > > > > warning: initialization of 'FuncPointerWithNoCfCheck' {aka 'void (__attribute__((nocf_check)) *)(void)'} from incompatible pointer type 'FuncPointer' {aka 'void (*)(void)'} > > > > > > > > c-pretty-print.cc doesn't seem to know how to print an [[]] attribute. > > > > I could do that, but then we'd print > > > > > > > > aka 'void ([[nocf_check]] *)(void)' > > > > > > > > in the above, but that's invalid syntax! > > > > > > Indeed, it should be > > > > > > void (* [[gnu::nocf_check]])(void) > > > > Ok, let me fix that too, then. I've updated the description to show > > what we print with the patch, and what was printed before. > > Oops, apparently I was wrongly assuming that the attribute appertained to > the pointer. So was I :/. > Since it actually appertains to the function type, it should > be > > void (*)(void) [[gnu::nocf_check]]. > > But for GCC attribute syntax, I think we want to leave the __attribute__ > where it was before, as in the manual's example > > void (__attribute__((noreturn)) ****f) (void); Thanks, done here: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- When getting the name of an attribute, we ought to use get_attribute_name, which handles both [[]] and __attribute__(()) forms. Failure to do so may result in an ICE, like here. pp_c_attributes_display wasn't able to print the [[]] form of attributes, so this patch teaches it to. When printing a pointer to function with a standard attribute, the attribute should be printed after the parameter-list. With this patch we print: aka 'void (*)(int) [[gnu::nocf_check]]' pp_c_attributes has been unused since its introduction in r56273 so this patch removes it. PR c++/106937 gcc/c-family/ChangeLog: * c-pretty-print.cc (pp_c_specifier_qualifier_list): Only print GNU attributes here. (c_pretty_printer::abstract_declarator): For a pointer to function, print the standard [[]] attributes here. (pp_c_attributes): Remove. (pp_c_attributes_display): Print the [[]] form if appropriate. Use get_attribute_name. Don't print a trailing space when printing the [[]] form. * c-pretty-print.h (pp_c_attributes): Remove. gcc/cp/ChangeLog: * error.cc: Include "attribs.h". (dump_type_prefix): Only print GNU attributes here. (dump_type_suffix): Print standard attributes here. gcc/testsuite/ChangeLog: * c-c++-common/pointer-to-fn1.c: New test. --- gcc/c-family/c-pretty-print.cc | 102 +++++++++++--------- gcc/c-family/c-pretty-print.h | 1 - gcc/cp/error.cc | 17 +++- gcc/testsuite/c-c++-common/pointer-to-fn1.c | 18 ++++ 4 files changed, 92 insertions(+), 46 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pointer-to-fn1.c base-commit: f30e9fd33e56a5a721346ea6140722e1b193db42 diff --git a/gcc/c-family/c-pretty-print.cc b/gcc/c-family/c-pretty-print.cc index efa1768f4d6..349f0a07d3e 100644 --- a/gcc/c-family/c-pretty-print.cc +++ b/gcc/c-family/c-pretty-print.cc @@ -466,7 +466,12 @@ pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t) { pp_c_whitespace (pp); pp_c_left_paren (pp); - pp_c_attributes_display (pp, TYPE_ATTRIBUTES (pointee)); + /* If we're dealing with the GNU form of attributes, print this: + void (__attribute__((noreturn)) *f) (); + If it is the standard [[]] attribute, we'll print the attribute + in c_pretty_printer::abstract_declarator. */ + if (!cxx11_attribute_p (TYPE_ATTRIBUTES (pointee))) + pp_c_attributes_display (pp, TYPE_ATTRIBUTES (pointee)); } else if (!c_dialect_cxx ()) pp_c_whitespace (pp); @@ -564,15 +569,26 @@ pp_c_parameter_type_list (c_pretty_printer *pp, tree t) void c_pretty_printer::abstract_declarator (tree t) { + bool fn_ptr_p = false; if (TREE_CODE (t) == POINTER_TYPE) { if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) - pp_c_right_paren (this); + { + pp_c_right_paren (this); + fn_ptr_p = true; + } t = TREE_TYPE (t); } direct_abstract_declarator (t); + /* If this is the standard [[]] attribute, print + void (*)() [[noreturn]]; */ + if (fn_ptr_p && cxx11_attribute_p (TYPE_ATTRIBUTES (t))) + { + pp_space (this); + pp_c_attributes_display (this, TYPE_ATTRIBUTES (t)); + } } /* direct-abstract-declarator: @@ -850,32 +866,7 @@ c_pretty_printer::declaration (tree t) pp_c_init_declarator (this, t); } -/* Pretty-print ATTRIBUTES using GNU C extension syntax. */ - -void -pp_c_attributes (c_pretty_printer *pp, tree attributes) -{ - if (attributes == NULL_TREE) - return; - - pp_c_ws_string (pp, "__attribute__"); - pp_c_left_paren (pp); - pp_c_left_paren (pp); - for (; attributes != NULL_TREE; attributes = TREE_CHAIN (attributes)) - { - pp_tree_identifier (pp, TREE_PURPOSE (attributes)); - if (TREE_VALUE (attributes)) - pp_c_call_argument_list (pp, TREE_VALUE (attributes)); - - if (TREE_CHAIN (attributes)) - pp_separate_with (pp, ','); - } - pp_c_right_paren (pp); - pp_c_right_paren (pp); -} - -/* Pretty-print ATTRIBUTES using GNU C extension syntax for attributes - marked to be displayed on disgnostic. */ +/* Pretty-print ATTRIBUTES marked to be displayed on diagnostic. */ void pp_c_attributes_display (c_pretty_printer *pp, tree a) @@ -885,10 +876,12 @@ pp_c_attributes_display (c_pretty_printer *pp, tree a) if (a == NULL_TREE) return; + const bool std_p = cxx11_attribute_p (a); + for (; a != NULL_TREE; a = TREE_CHAIN (a)) { - const struct attribute_spec *as; - as = lookup_attribute_spec (TREE_PURPOSE (a)); + const struct attribute_spec *as + = lookup_attribute_spec (get_attribute_name (a)); if (!as || as->affects_type_identity == false) continue; if (c_dialect_cxx () @@ -896,26 +889,47 @@ pp_c_attributes_display (c_pretty_printer *pp, tree a) /* In C++ transaction_safe is printed at the end of the declarator. */ continue; if (is_first) - { - pp_c_ws_string (pp, "__attribute__"); - pp_c_left_paren (pp); - pp_c_left_paren (pp); - is_first = false; - } + { + if (std_p) + { + pp_c_left_bracket (pp); + pp_c_left_bracket (pp); + } + else + { + pp_c_ws_string (pp, "__attribute__"); + pp_c_left_paren (pp); + pp_c_left_paren (pp); + } + is_first = false; + } else - { - pp_separate_with (pp, ','); - } - pp_tree_identifier (pp, TREE_PURPOSE (a)); + pp_separate_with (pp, ','); + tree ns; + if (std_p && (ns = get_attribute_namespace (a))) + { + pp_tree_identifier (pp, ns); + pp_colon (pp); + pp_colon (pp); + } + pp_tree_identifier (pp, get_attribute_name (a)); if (TREE_VALUE (a)) - pp_c_call_argument_list (pp, TREE_VALUE (a)); + pp_c_call_argument_list (pp, TREE_VALUE (a)); } if (!is_first) { - pp_c_right_paren (pp); - pp_c_right_paren (pp); - pp_c_whitespace (pp); + if (std_p) + { + pp_c_right_bracket (pp); + pp_c_right_bracket (pp); + } + else + { + pp_c_right_paren (pp); + pp_c_right_paren (pp); + pp_c_whitespace (pp); + } } } diff --git a/gcc/c-family/c-pretty-print.h b/gcc/c-family/c-pretty-print.h index be86bed4fee..92674ab4d06 100644 --- a/gcc/c-family/c-pretty-print.h +++ b/gcc/c-family/c-pretty-print.h @@ -119,7 +119,6 @@ void pp_c_space_for_pointer_operator (c_pretty_printer *, tree); /* Declarations. */ void pp_c_tree_decl_identifier (c_pretty_printer *, tree); void pp_c_function_definition (c_pretty_printer *, tree); -void pp_c_attributes (c_pretty_printer *, tree); void pp_c_attributes_display (c_pretty_printer *, tree); void pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type); void pp_c_type_qualifier_list (c_pretty_printer *, tree); diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc index 4514c8bbb44..8cd011fab0e 100644 --- a/gcc/cp/error.cc +++ b/gcc/cp/error.cc @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "internal-fn.h" #include "gcc-rich-location.h" #include "cp-name-hint.h" +#include "attribs.h" #define pp_separate_with_comma(PP) pp_cxx_separate_with (PP, ',') #define pp_separate_with_semicolon(PP) pp_cxx_separate_with (PP, ';') @@ -897,7 +898,12 @@ dump_type_prefix (cxx_pretty_printer *pp, tree t, int flags) { pp_cxx_whitespace (pp); pp_cxx_left_paren (pp); - pp_c_attributes_display (pp, TYPE_ATTRIBUTES (sub)); + /* If we're dealing with the GNU form of attributes, print this: + void (__attribute__((noreturn)) *f) (); + If it is the standard [[]] attribute, we'll print the attribute + in dump_type_suffix. */ + if (!cxx11_attribute_p (TYPE_ATTRIBUTES (sub))) + pp_c_attributes_display (pp, TYPE_ATTRIBUTES (sub)); } if (TYPE_PTR_P (t)) pp_star (pp); @@ -1027,6 +1033,15 @@ dump_type_suffix (cxx_pretty_printer *pp, tree t, int flags) TREE_CODE (t) == FUNCTION_TYPE && (flags & TFF_POINTER)); dump_ref_qualifier (pp, t, flags); + /* If this is the standard [[]] attribute, print + void (*)() [[noreturn]]; */ + if ((flags & TFF_POINTER) + && cxx11_attribute_p (TYPE_ATTRIBUTES (t))) + { + pp_space (pp); + pp_c_attributes_display (pp, TYPE_ATTRIBUTES (t)); + pp->padding = pp_before; + } if (tx_safe_fn_type_p (t)) pp_cxx_ws_string (pp, "transaction_safe"); dump_exception_spec (pp, TYPE_RAISES_EXCEPTIONS (t), flags); diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c new file mode 100644 index 00000000000..975885462e9 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pointer-to-fn1.c @@ -0,0 +1,18 @@ +/* PR c++/106937 */ +/* { dg-options "-fcf-protection" } */ +/* { dg-additional-options "-std=c++11 -fpermissive" { target c++ } } */ +/* Test printing a pointer to function with attribute. */ + +__attribute__((nocf_check)) typedef void (*FPA1)(); +[[gnu::nocf_check]] typedef void (*FPA2)(int); +typedef void (*FP1)(); +typedef void (*FP2)(int); + +void +g (FP1 f1, FP2 f2) +{ + FPA1 p1 = f1; // { dg-warning {aka 'void \(__attribute__\(\(nocf_check\)\) \*\)\(\)'} } + FPA2 p2 = f2; // { dg-warning {aka 'void \(\*\)\(int\) \[\[gnu::nocf_check\]\]'} } + FP1 p3 = p1; // { dg-warning {aka 'void \(__attribute__\(\(nocf_check\)\) \*\)\(\)'} } + FP2 p4 = p2; // { dg-warning {aka 'void \(\*\)\(int\) \[\[gnu::nocf_check\]\]'} } +}