From patchwork Tue Sep 5 13:48:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 137524 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp1692582vqo; Tue, 5 Sep 2023 06:49:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfRCVtQerBmV1E42arpxM+kfjXHN3HWn3uydEA6llMsUvpyszLrkZPOzwkMvAiDAonNkyi X-Received: by 2002:a05:6512:108d:b0:4ff:7f57:facd with SMTP id j13-20020a056512108d00b004ff7f57facdmr10410840lfg.54.1693921751824; Tue, 05 Sep 2023 06:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693921751; cv=none; d=google.com; s=arc-20160816; b=gQTLXQWJtBI1EmU7XqmdnrphlLKDqz5NGoheO5nPF9V8T4jHatmLX86ZGVky527Bzw 10xfh4lrqpIkmve7jqEB461VziQEFcFvR8J+enhWWR4WB0qLK2KyV36qXUW8w/hJ8axD qOi5rd8WMf4ABTiPIR9EktDU9a2Qrw5wvrm1KSuNbk9u5zL9h4wqYwjZ9MN5XB5guRDh kawnwW5k8Mn42B4Q3t2z41F/BCL67EnXA0QcPudilkDPWmzXTnccvd0xUA23o+CVVNcl w/xqQi1rCJrON06fdlkeE10TRwRIDQK4B7LUrhRlY3hZ6LQkOhjykDWat8J695cVkVQz 0fSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=KezKzrQKRiPw1N7zPUxHFiO3xBMor+k+5/EIS3EuC1M=; fh=gp6DdavjU1HuX6uJACMn6s+TwbJMiK/N5WwsfWqFzqA=; b=oeSBjJ2fL+AvQuDmSEf0aKwjNIy9kTCYAPcXNZ57bhsdvENgwBfqAgwYD5urNAEiuk DOpfaisunuizBQ/8T/26N4kIKCXCnuSYak8E4nJLAc4BL3932m0bbGb1J63UU8uSbU16 7bD7Q0Wssy4sxqe5UdrFFuhwsWyRdE+VRBvp5uuNTZO5PfF4UDO03yDmBwisAMVU2N4a T8bMY8sjDqdE7aAkDPdW1GDu/52Bnc6/H5ih8P8S383TpvqnqZKYQ/OZLQji/JkxV3X7 LDxYrls7fNZMx3/c94cofmPYoz1D4eMhAdj3nsYypXZ8q/lF9mk9yyceaSL73hFj6LZZ eVqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aKEjDuxN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g5-20020a50ee05000000b0052556e760ffsi697865eds.74.2023.09.05.06.49.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 06:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=aKEjDuxN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 7E2693857835 for ; Tue, 5 Sep 2023 13:49:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E2693857835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693921750; bh=KezKzrQKRiPw1N7zPUxHFiO3xBMor+k+5/EIS3EuC1M=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=aKEjDuxNtA2upD62JNP58IWgjIm/E5NlnEy6csudRvvSHKaZ19T1+SveU+I5ht/1c KSvl+eMJBRep2B2gAE0rPXGYIvyjPZWtinRoy5FrUsuHdIsly8/FqcYSxRWu0zcGDQ oZ1mC0RmP7K1P+DOY3vRQ6fsjXr2FB+vcNxMDz9s= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id B947D3858D32 for ; Tue, 5 Sep 2023 13:48:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B947D3858D32 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-529--VrYYanGPpW91_O7Qylh-A-1; Tue, 05 Sep 2023 09:48:19 -0400 X-MC-Unique: -VrYYanGPpW91_O7Qylh-A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8032118DA722; Tue, 5 Sep 2023 13:48:19 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29AAAC03292; Tue, 5 Sep 2023 13:48:17 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 385DmG0j1060025 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 Sep 2023 15:48:16 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 385DmFql1060024; Tue, 5 Sep 2023 15:48:15 +0200 Date: Tue, 5 Sep 2023 15:48:15 +0200 To: "Joseph S. Myers" Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] c: Don't pedwarn on _FloatN{,x} or {f,F}N{,x} suffixes for C2X Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776205694667072621 X-GMAIL-MSGID: 1776205694667072621 Hi! Now that _Float{16,32,64,128,32x,64x,128x} and {f,F}{16,32,64,128,32x,64x,128x} literal suffixes are in C23 standard, I think it is undesirable to pedwarn about these for -std=c2x, so this patch uses pedwarn_c11 instead. In c-family/, we don't have that function and am not sure it would be very clean to define dummy pedwarn_c11 in the C++ FE, so the patch just does what pedwarn_c11 does using pedwarn/warning. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-09-05 Jakub Jelinek gcc/c-family/ * c-lex.cc (interpret_float): For C diagnostics on FN and FNx suffixes append " before C2X" to diagnostics text and follow behavior of pedwarn_c11. gcc/c/ * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic text. gcc/testsuite/ * gcc.dg/c11-floatn-1.c: New test. * gcc.dg/c11-floatn-2.c: New test. * gcc.dg/c11-floatn-3.c: New test. * gcc.dg/c11-floatn-4.c: New test. * gcc.dg/c11-floatn-5.c: New test. * gcc.dg/c11-floatn-6.c: New test. * gcc.dg/c11-floatn-7.c: New test. * gcc.dg/c11-floatn-8.c: New test. * gcc.dg/c2x-floatn-1.c: New test. * gcc.dg/c2x-floatn-2.c: New test. * gcc.dg/c2x-floatn-3.c: New test. * gcc.dg/c2x-floatn-4.c: New test. * gcc.dg/c2x-floatn-5.c: New test. * gcc.dg/c2x-floatn-6.c: New test. * gcc.dg/c2x-floatn-7.c: New test. * gcc.dg/c2x-floatn-8.c: New test. Jakub --- gcc/c-family/c-lex.cc.jj 2023-09-04 09:45:44.528902928 +0200 +++ gcc/c-family/c-lex.cc 2023-09-05 09:54:29.060725832 +0200 @@ -1185,7 +1185,25 @@ interpret_float (const cpp_token *token, error ("unsupported non-standard suffix on floating constant"); return error_mark_node; } - else if (c_dialect_cxx () && !extended) + else if (!c_dialect_cxx ()) + { + if (warn_c11_c2x_compat > 0) + { + if (pedantic && !flag_isoc2x) + pedwarn (input_location, OPT_Wc11_c2x_compat, + "non-standard suffix on floating constant " + "before C2X"); + else + warning (OPT_Wc11_c2x_compat, + "non-standard suffix on floating constant " + "before C2X"); + } + else if (warn_c11_c2x_compat != 0 && pedantic && !flag_isoc2x) + pedwarn (input_location, OPT_Wpedantic, + "non-standard suffix on floating constant " + "before C2X"); + } + else if (!extended) { if (cxx_dialect < cxx23) pedwarn (input_location, OPT_Wpedantic, --- gcc/c/c-decl.cc.jj 2023-09-04 09:45:47.998853807 +0200 +++ gcc/c/c-decl.cc 2023-09-05 09:43:28.384918043 +0200 @@ -12140,12 +12140,13 @@ declspecs_add_type (location_t loc, stru CASE_RID_FLOATN_NX: specs->u.floatn_nx_idx = i - RID_FLOATN_NX_FIRST; if (!in_system_header_at (input_location)) - pedwarn (loc, OPT_Wpedantic, - "ISO C does not support the %<_Float%d%s%> type", - floatn_nx_types[specs->u.floatn_nx_idx].n, - (floatn_nx_types[specs->u.floatn_nx_idx].extended - ? "x" - : "")); + pedwarn_c11 (loc, OPT_Wpedantic, + "ISO C does not support the %<_Float%d%s%> type" + " before C2X", + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended + ? "x" + : "")); if (specs->long_p) error_at (loc, --- gcc/testsuite/gcc.dg/c11-floatn-1.c.jj 2023-09-05 10:07:09.062110156 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-1.c 2023-09-05 10:10:57.288912286 +0200 @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-add-options float32 } */ +/* { dg-add-options float64 } */ +/* { dg-add-options float32x } */ +/* { dg-require-effective-target float32 } */ +/* { dg-require-effective-target float32x } */ +/* { dg-require-effective-target float64 } */ + +_Float32 a /* { dg-error "ISO C does not support the '_Float32' type before C2X" } */ + = 1.0F32; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +_Float64 b /* { dg-error "ISO C does not support the '_Float64' type before C2X" } */ + = 1.0F64; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +_Float32x c /* { dg-error "ISO C does not support the '_Float32x' type before C2X" } */ + = 1.0F32x; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float32 d + = 2.0F32; +__extension__ _Float64 e + = 2.0F64; +__extension__ _Float32x f + = 2.0F32x; --- gcc/testsuite/gcc.dg/c11-floatn-2.c.jj 2023-09-05 10:11:15.563655318 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-2.c 2023-09-05 10:11:46.998213306 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-add-options float128 } */ +/* { dg-require-effective-target float128 } */ + +_Float128 a /* { dg-error "ISO C does not support the '_Float128' type before C2X" } */ + = 1.0F128; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float128 b + = 2.0F128; --- gcc/testsuite/gcc.dg/c11-floatn-3.c.jj 2023-09-05 10:12:49.550333735 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-3.c 2023-09-05 10:13:06.620093710 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-add-options float16 } */ +/* { dg-require-effective-target float16 } */ + +_Float16 a /* { dg-error "ISO C does not support the '_Float16' type before C2X" } */ + = 1.0F16; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float16 b + = 2.0F16; --- gcc/testsuite/gcc.dg/c11-floatn-4.c.jj 2023-09-05 10:13:47.421519981 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-4.c 2023-09-05 10:14:08.988216724 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-add-options float64x } */ +/* { dg-require-effective-target float64x } */ + +_Float64x a /* { dg-error "ISO C does not support the '_Float64x' type before C2X" } */ + = 1.0F64x; /* { dg-error "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float64x b + = 2.0F64x; --- gcc/testsuite/gcc.dg/c11-floatn-5.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-5.c 2023-09-05 10:21:09.303306513 +0200 @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -Wc11-c2x-compat" } */ +/* { dg-add-options float32 } */ +/* { dg-add-options float64 } */ +/* { dg-add-options float32x } */ +/* { dg-require-effective-target float32 } */ +/* { dg-require-effective-target float32x } */ +/* { dg-require-effective-target float64 } */ + +_Float32 a /* { dg-warning "ISO C does not support the '_Float32' type before C2X" } */ + = 1.0F32; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +_Float64 b /* { dg-warning "ISO C does not support the '_Float64' type before C2X" } */ + = 1.0F64; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +_Float32x c /* { dg-warning "ISO C does not support the '_Float32x' type before C2X" } */ + = 1.0F32x; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float32 d + = 2.0F32; +__extension__ _Float64 e + = 2.0F64; +__extension__ _Float32x f + = 2.0F32x; --- gcc/testsuite/gcc.dg/c11-floatn-6.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-6.c 2023-09-05 10:21:23.343109088 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -Wc11-c2x-compat" } */ +/* { dg-add-options float128 } */ +/* { dg-require-effective-target float128 } */ + +_Float128 a /* { dg-warning "ISO C does not support the '_Float128' type before C2X" } */ + = 1.0F128; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float128 b + = 2.0F128; --- gcc/testsuite/gcc.dg/c11-floatn-7.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-7.c 2023-09-05 10:21:34.562951322 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -Wc11-c2x-compat" } */ +/* { dg-add-options float16 } */ +/* { dg-require-effective-target float16 } */ + +_Float16 a /* { dg-warning "ISO C does not support the '_Float16' type before C2X" } */ + = 1.0F16; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float16 b + = 2.0F16; --- gcc/testsuite/gcc.dg/c11-floatn-8.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c11-floatn-8.c 2023-09-05 10:21:45.923791582 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c11 -Wc11-c2x-compat" } */ +/* { dg-add-options float64x } */ +/* { dg-require-effective-target float64x } */ + +_Float64x a /* { dg-warning "ISO C does not support the '_Float64x' type before C2X" } */ + = 1.0F64x; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float64x b + = 2.0F64x; --- gcc/testsuite/gcc.dg/c2x-floatn-1.c.jj 2023-09-05 10:07:34.640752875 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-1.c 2023-09-05 10:09:06.443470577 +0200 @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-add-options float32 } */ +/* { dg-add-options float64 } */ +/* { dg-add-options float32x } */ +/* { dg-require-effective-target float32 } */ +/* { dg-require-effective-target float32x } */ +/* { dg-require-effective-target float64 } */ + +_Float32 a + = 1.0F32; +_Float64 b + = 1.0F64; +_Float32x c + = 1.0F32x; +__extension__ _Float32 d + = 2.0F32; +__extension__ _Float64 e + = 2.0F64; +__extension__ _Float32x f + = 2.0F32x; --- gcc/testsuite/gcc.dg/c2x-floatn-2.c.jj 2023-09-05 10:12:03.288984233 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-2.c 2023-09-05 10:12:17.367786266 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-add-options float128 } */ +/* { dg-require-effective-target float128 } */ + +_Float128 a + = 1.0F128; +__extension__ _Float128 b + = 2.0F128; --- gcc/testsuite/gcc.dg/c2x-floatn-3.c.jj 2023-09-05 10:13:20.798894337 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-3.c 2023-09-05 10:13:31.407745160 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-add-options float16 } */ +/* { dg-require-effective-target float16 } */ + +_Float16 a + = 1.0F16; +__extension__ _Float16 b + = 2.0F16; --- gcc/testsuite/gcc.dg/c2x-floatn-4.c.jj 2023-09-05 10:14:28.384943981 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-4.c 2023-09-05 10:14:38.197805997 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-add-options float64x } */ +/* { dg-require-effective-target float64x } */ + +_Float64x a + = 1.0F64x; +__extension__ _Float64x b + = 2.0F64x; --- gcc/testsuite/gcc.dg/c2x-floatn-5.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-5.c 2023-09-05 10:22:25.083240936 +0200 @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -Wc11-c2x-compat" } */ +/* { dg-add-options float32 } */ +/* { dg-add-options float64 } */ +/* { dg-add-options float32x } */ +/* { dg-require-effective-target float32 } */ +/* { dg-require-effective-target float32x } */ +/* { dg-require-effective-target float64 } */ + +_Float32 a /* { dg-warning "ISO C does not support the '_Float32' type before C2X" } */ + = 1.0F32; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +_Float64 b /* { dg-warning "ISO C does not support the '_Float64' type before C2X" } */ + = 1.0F64; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +_Float32x c /* { dg-warning "ISO C does not support the '_Float32x' type before C2X" } */ + = 1.0F32x; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float32 d + = 2.0F32; +__extension__ _Float64 e + = 2.0F64; +__extension__ _Float32x f + = 2.0F32x; --- gcc/testsuite/gcc.dg/c2x-floatn-6.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-6.c 2023-09-05 10:22:31.626148929 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -Wc11-c2x-compat" } */ +/* { dg-add-options float128 } */ +/* { dg-require-effective-target float128 } */ + +_Float128 a /* { dg-warning "ISO C does not support the '_Float128' type before C2X" } */ + = 1.0F128; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float128 b + = 2.0F128; --- gcc/testsuite/gcc.dg/c2x-floatn-7.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-7.c 2023-09-05 10:22:38.323054765 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -Wc11-c2x-compat" } */ +/* { dg-add-options float16 } */ +/* { dg-require-effective-target float16 } */ + +_Float16 a /* { dg-warning "ISO C does not support the '_Float16' type before C2X" } */ + = 1.0F16; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float16 b + = 2.0F16; --- gcc/testsuite/gcc.dg/c2x-floatn-8.c.jj 2023-09-05 10:20:47.359615068 +0200 +++ gcc/testsuite/gcc.dg/c2x-floatn-8.c 2023-09-05 10:22:44.625966133 +0200 @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -Wc11-c2x-compat" } */ +/* { dg-add-options float64x } */ +/* { dg-require-effective-target float64x } */ + +_Float64x a /* { dg-warning "ISO C does not support the '_Float64x' type before C2X" } */ + = 1.0F64x; /* { dg-warning "non-standard suffix on floating constant before C2X" } */ +__extension__ _Float64x b + = 2.0F64x;