From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id 795CB3858CDB; Mon, 26 Feb 2024 15:31:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 795CB3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708961466; bh=5AxKyheh0kHuvoKv8MLgDOrYHoLBTDSUpTduDU/RQ6k=; h=From:To:Subject:Date:From; b=rgA6n1BRhP4hBS6GcdgentMfbgvvW7QcGUYSPmVuzp9WGx21YchVWI+lw9iLMkNE5 5MtKL0sh8ri1WQ189+6DU+rU/heIdn/M2f8MmppxLBs5UeQ5xID42lXZyMlQdsr0x2 UC+Jg4GHOgPNHDsiduLr/Wm+/c4TL5vj8su0gG24= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-9184] c: Improve some diagnostics for __builtin_stdc_bit_* [PR114042] X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 10c73c111652208c5f9dc63a52933f4d6550cadd X-Git-Newrev: 77576915cfd26e603aba5295dfdac54a5545f5f2 Message-Id: <20240226153106.795CB3858CDB@sourceware.org> Date: Mon, 26 Feb 2024 15:31:06 +0000 (GMT) List-Id: https://gcc.gnu.org/g:77576915cfd26e603aba5295dfdac54a5545f5f2 commit r14-9184-g77576915cfd26e603aba5295dfdac54a5545f5f2 Author: Jakub Jelinek Date: Mon Feb 26 16:30:16 2024 +0100 c: Improve some diagnostics for __builtin_stdc_bit_* [PR114042] The PR complains that for the __builtin_stdc_bit_* "builtins" the diagnostics doesn't mention the name of the builtin the user used, but instead __builtin_{clz,ctz,popcount}g instead (which is what the FE immediately lowers it to). The following patch repeats the checks from check_builtin_function_arguments which are there done on BUILT_IN_{CLZ,CTZ,POPCOUNT}G, such that they diagnose it with the name of the "builtin" user actually used before it is gone. 2024-02-26 Jakub Jelinek PR c/114042 * c-parser.cc (c_parser_postfix_expression): Diagnose __builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE type or if signed here rather than on the replacement builtins in check_builtin_function_arguments. * gcc.dg/builtin-stdc-bit-2.c: Adjust testcase for actual builtin names rather than names of builtin replacements. Diff: --- gcc/c/c-parser.cc | 21 ++++++++ gcc/testsuite/gcc.dg/builtin-stdc-bit-2.c | 84 +++++++++++++++---------------- 2 files changed, 63 insertions(+), 42 deletions(-) diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 8019e60b1e02..53e99aa29d96 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -11859,6 +11859,27 @@ c_parser_postfix_expression (c_parser *parser) expr.set_error (); break; } + if (TREE_CODE (TREE_TYPE (arg_p->value)) == ENUMERAL_TYPE) + { + error_at (loc, "argument %u in call to function " + "%qs has enumerated type", 1, name); + expr.set_error (); + break; + } + if (TREE_CODE (TREE_TYPE (arg_p->value)) == BOOLEAN_TYPE) + { + error_at (loc, "argument %u in call to function " + "%qs has boolean type", 1, name); + expr.set_error (); + break; + } + if (!TYPE_UNSIGNED (TREE_TYPE (arg_p->value))) + { + error_at (loc, "argument 1 in call to function " + "%qs has signed type", name); + expr.set_error (); + break; + } tree arg = arg_p->value; tree type = TYPE_MAIN_VARIANT (TREE_TYPE (arg)); /* Expand: diff --git a/gcc/testsuite/gcc.dg/builtin-stdc-bit-2.c b/gcc/testsuite/gcc.dg/builtin-stdc-bit-2.c index 19977530ca4a..c7430c5f96fc 100644 --- a/gcc/testsuite/gcc.dg/builtin-stdc-bit-2.c +++ b/gcc/testsuite/gcc.dg/builtin-stdc-bit-2.c @@ -14,9 +14,9 @@ foo (void) __builtin_stdc_leading_zeros ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_leading_zeros' operand not an integral type" } */ __builtin_stdc_leading_zeros (); /* { dg-error "wrong number of arguments to '__builtin_stdc_leading_zeros'" } */ __builtin_stdc_leading_zeros (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_leading_zeros'" } */ - __builtin_stdc_leading_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_leading_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_leading_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_leading_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_zeros' has boolean type" } */ + __builtin_stdc_leading_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_zeros' has enumerated type" } */ + __builtin_stdc_leading_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_zeros' has signed type" } */ __builtin_stdc_leading_ones (0.0f); /* { dg-error "'__builtin_stdc_leading_ones' operand not an integral type" } */ __builtin_stdc_leading_ones (0.0); /* { dg-error "'__builtin_stdc_leading_ones' operand not an integral type" } */ __builtin_stdc_leading_ones (0.0L); /* { dg-error "'__builtin_stdc_leading_ones' operand not an integral type" } */ @@ -24,9 +24,9 @@ foo (void) __builtin_stdc_leading_ones ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_leading_ones' operand not an integral type" } */ __builtin_stdc_leading_ones (); /* { dg-error "wrong number of arguments to '__builtin_stdc_leading_ones'" } */ __builtin_stdc_leading_ones (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_leading_ones'" } */ - __builtin_stdc_leading_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_leading_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_leading_ones (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_leading_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_ones' has boolean type" } */ + __builtin_stdc_leading_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_ones' has enumerated type" } */ + __builtin_stdc_leading_ones (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_leading_ones' has signed type" } */ __builtin_stdc_trailing_zeros (0.0f); /* { dg-error "'__builtin_stdc_trailing_zeros' operand not an integral type" } */ __builtin_stdc_trailing_zeros (0.0); /* { dg-error "'__builtin_stdc_trailing_zeros' operand not an integral type" } */ __builtin_stdc_trailing_zeros (0.0L); /* { dg-error "'__builtin_stdc_trailing_zeros' operand not an integral type" } */ @@ -34,9 +34,9 @@ foo (void) __builtin_stdc_trailing_zeros ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_trailing_zeros' operand not an integral type" } */ __builtin_stdc_trailing_zeros (); /* { dg-error "wrong number of arguments to '__builtin_stdc_trailing_zeros'" } */ __builtin_stdc_trailing_zeros (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_trailing_zeros'" } */ - __builtin_stdc_trailing_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has boolean type" } */ - __builtin_stdc_trailing_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has enumerated type" } */ - __builtin_stdc_trailing_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has signed type" } */ + __builtin_stdc_trailing_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_zeros' has boolean type" } */ + __builtin_stdc_trailing_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_zeros' has enumerated type" } */ + __builtin_stdc_trailing_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_zeros' has signed type" } */ __builtin_stdc_trailing_ones (0.0f); /* { dg-error "'__builtin_stdc_trailing_ones' operand not an integral type" } */ __builtin_stdc_trailing_ones (0.0); /* { dg-error "'__builtin_stdc_trailing_ones' operand not an integral type" } */ __builtin_stdc_trailing_ones (0.0L); /* { dg-error "'__builtin_stdc_trailing_ones' operand not an integral type" } */ @@ -44,9 +44,9 @@ foo (void) __builtin_stdc_trailing_ones ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_trailing_ones' operand not an integral type" } */ __builtin_stdc_trailing_ones (); /* { dg-error "wrong number of arguments to '__builtin_stdc_trailing_ones'" } */ __builtin_stdc_trailing_ones (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_trailing_ones'" } */ - __builtin_stdc_trailing_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has boolean type" } */ - __builtin_stdc_trailing_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has enumerated type" } */ - __builtin_stdc_trailing_ones (0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has signed type" } */ + __builtin_stdc_trailing_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_ones' has boolean type" } */ + __builtin_stdc_trailing_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_ones' has enumerated type" } */ + __builtin_stdc_trailing_ones (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_trailing_ones' has signed type" } */ __builtin_stdc_first_leading_zero (0.0f); /* { dg-error "'__builtin_stdc_first_leading_zero' operand not an integral type" } */ __builtin_stdc_first_leading_zero (0.0); /* { dg-error "'__builtin_stdc_first_leading_zero' operand not an integral type" } */ __builtin_stdc_first_leading_zero (0.0L); /* { dg-error "'__builtin_stdc_first_leading_zero' operand not an integral type" } */ @@ -54,9 +54,9 @@ foo (void) __builtin_stdc_first_leading_zero ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_first_leading_zero' operand not an integral type" } */ __builtin_stdc_first_leading_zero (); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_leading_zero'" } */ __builtin_stdc_first_leading_zero (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_leading_zero'" } */ - __builtin_stdc_first_leading_zero ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_first_leading_zero ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_first_leading_zero (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_first_leading_zero ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_zero' has boolean type" } */ + __builtin_stdc_first_leading_zero ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_zero' has enumerated type" } */ + __builtin_stdc_first_leading_zero (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_zero' has signed type" } */ __builtin_stdc_first_leading_one (0.0f); /* { dg-error "'__builtin_stdc_first_leading_one' operand not an integral type" } */ __builtin_stdc_first_leading_one (0.0); /* { dg-error "'__builtin_stdc_first_leading_one' operand not an integral type" } */ __builtin_stdc_first_leading_one (0.0L); /* { dg-error "'__builtin_stdc_first_leading_one' operand not an integral type" } */ @@ -64,9 +64,9 @@ foo (void) __builtin_stdc_first_leading_one ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_first_leading_one' operand not an integral type" } */ __builtin_stdc_first_leading_one (); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_leading_one'" } */ __builtin_stdc_first_leading_one (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_leading_one'" } */ - __builtin_stdc_first_leading_one ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_first_leading_one ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_first_leading_one (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_first_leading_one ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_one' has boolean type" } */ + __builtin_stdc_first_leading_one ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_one' has enumerated type" } */ + __builtin_stdc_first_leading_one (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_leading_one' has signed type" } */ __builtin_stdc_first_trailing_zero (0.0f); /* { dg-error "'__builtin_stdc_first_trailing_zero' operand not an integral type" } */ __builtin_stdc_first_trailing_zero (0.0); /* { dg-error "'__builtin_stdc_first_trailing_zero' operand not an integral type" } */ __builtin_stdc_first_trailing_zero (0.0L); /* { dg-error "'__builtin_stdc_first_trailing_zero' operand not an integral type" } */ @@ -74,9 +74,9 @@ foo (void) __builtin_stdc_first_trailing_zero ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_first_trailing_zero' operand not an integral type" } */ __builtin_stdc_first_trailing_zero (); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_trailing_zero'" } */ __builtin_stdc_first_trailing_zero (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_trailing_zero'" } */ - __builtin_stdc_first_trailing_zero ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has boolean type" } */ - __builtin_stdc_first_trailing_zero ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has enumerated type" } */ - __builtin_stdc_first_trailing_zero (0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has signed type" } */ + __builtin_stdc_first_trailing_zero ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_zero' has boolean type" } */ + __builtin_stdc_first_trailing_zero ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_zero' has enumerated type" } */ + __builtin_stdc_first_trailing_zero (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_zero' has signed type" } */ __builtin_stdc_first_trailing_one (0.0f); /* { dg-error "'__builtin_stdc_first_trailing_one' operand not an integral type" } */ __builtin_stdc_first_trailing_one (0.0); /* { dg-error "'__builtin_stdc_first_trailing_one' operand not an integral type" } */ __builtin_stdc_first_trailing_one (0.0L); /* { dg-error "'__builtin_stdc_first_trailing_one' operand not an integral type" } */ @@ -84,9 +84,9 @@ foo (void) __builtin_stdc_first_trailing_one ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_first_trailing_one' operand not an integral type" } */ __builtin_stdc_first_trailing_one (); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_trailing_one'" } */ __builtin_stdc_first_trailing_one (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_first_trailing_one'" } */ - __builtin_stdc_first_trailing_one ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has boolean type" } */ - __builtin_stdc_first_trailing_one ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has enumerated type" } */ - __builtin_stdc_first_trailing_one (0); /* { dg-error "argument 1 in call to function '__builtin_ctzg' has signed type" } */ + __builtin_stdc_first_trailing_one ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_one' has boolean type" } */ + __builtin_stdc_first_trailing_one ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_one' has enumerated type" } */ + __builtin_stdc_first_trailing_one (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_first_trailing_one' has signed type" } */ __builtin_stdc_count_zeros (0.0f); /* { dg-error "'__builtin_stdc_count_zeros' operand not an integral type" } */ __builtin_stdc_count_zeros (0.0); /* { dg-error "'__builtin_stdc_count_zeros' operand not an integral type" } */ __builtin_stdc_count_zeros (0.0L); /* { dg-error "'__builtin_stdc_count_zeros' operand not an integral type" } */ @@ -94,9 +94,9 @@ foo (void) __builtin_stdc_count_zeros ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_count_zeros' operand not an integral type" } */ __builtin_stdc_count_zeros (); /* { dg-error "wrong number of arguments to '__builtin_stdc_count_zeros'" } */ __builtin_stdc_count_zeros (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_count_zeros'" } */ - __builtin_stdc_count_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has boolean type" } */ - __builtin_stdc_count_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has enumerated type" } */ - __builtin_stdc_count_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has signed type" } */ + __builtin_stdc_count_zeros ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_zeros' has boolean type" } */ + __builtin_stdc_count_zeros ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_zeros' has enumerated type" } */ + __builtin_stdc_count_zeros (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_zeros' has signed type" } */ __builtin_stdc_count_ones (0.0f); /* { dg-error "'__builtin_stdc_count_ones' operand not an integral type" } */ __builtin_stdc_count_ones (0.0); /* { dg-error "'__builtin_stdc_count_ones' operand not an integral type" } */ __builtin_stdc_count_ones (0.0L); /* { dg-error "'__builtin_stdc_count_ones' operand not an integral type" } */ @@ -104,9 +104,9 @@ foo (void) __builtin_stdc_count_ones ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_count_ones' operand not an integral type" } */ __builtin_stdc_count_ones (); /* { dg-error "wrong number of arguments to '__builtin_stdc_count_ones'" } */ __builtin_stdc_count_ones (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_count_ones'" } */ - __builtin_stdc_count_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has boolean type" } */ - __builtin_stdc_count_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has enumerated type" } */ - __builtin_stdc_count_ones (0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has signed type" } */ + __builtin_stdc_count_ones ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_ones' has boolean type" } */ + __builtin_stdc_count_ones ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_ones' has enumerated type" } */ + __builtin_stdc_count_ones (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_count_ones' has signed type" } */ __builtin_stdc_has_single_bit (0.0f); /* { dg-error "'__builtin_stdc_has_single_bit' operand not an integral type" } */ __builtin_stdc_has_single_bit (0.0); /* { dg-error "'__builtin_stdc_has_single_bit' operand not an integral type" } */ __builtin_stdc_has_single_bit (0.0L); /* { dg-error "'__builtin_stdc_has_single_bit' operand not an integral type" } */ @@ -114,9 +114,9 @@ foo (void) __builtin_stdc_has_single_bit ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_has_single_bit' operand not an integral type" } */ __builtin_stdc_has_single_bit (); /* { dg-error "wrong number of arguments to '__builtin_stdc_has_single_bit'" } */ __builtin_stdc_has_single_bit (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_has_single_bit'" } */ - __builtin_stdc_has_single_bit ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has boolean type" } */ - __builtin_stdc_has_single_bit ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has enumerated type" } */ - __builtin_stdc_has_single_bit (0); /* { dg-error "argument 1 in call to function '__builtin_popcountg' has signed type" } */ + __builtin_stdc_has_single_bit ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_has_single_bit' has boolean type" } */ + __builtin_stdc_has_single_bit ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_has_single_bit' has enumerated type" } */ + __builtin_stdc_has_single_bit (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_has_single_bit' has signed type" } */ __builtin_stdc_bit_width (0.0f); /* { dg-error "'__builtin_stdc_bit_width' operand not an integral type" } */ __builtin_stdc_bit_width (0.0); /* { dg-error "'__builtin_stdc_bit_width' operand not an integral type" } */ __builtin_stdc_bit_width (0.0L); /* { dg-error "'__builtin_stdc_bit_width' operand not an integral type" } */ @@ -124,9 +124,9 @@ foo (void) __builtin_stdc_bit_width ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_bit_width' operand not an integral type" } */ __builtin_stdc_bit_width (); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_width'" } */ __builtin_stdc_bit_width (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_width'" } */ - __builtin_stdc_bit_width ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_bit_width ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_bit_width (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_bit_width ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_width' has boolean type" } */ + __builtin_stdc_bit_width ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_width' has enumerated type" } */ + __builtin_stdc_bit_width (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_width' has signed type" } */ __builtin_stdc_bit_floor (0.0f); /* { dg-error "'__builtin_stdc_bit_floor' operand not an integral type" } */ __builtin_stdc_bit_floor (0.0); /* { dg-error "'__builtin_stdc_bit_floor' operand not an integral type" } */ __builtin_stdc_bit_floor (0.0L); /* { dg-error "'__builtin_stdc_bit_floor' operand not an integral type" } */ @@ -134,9 +134,9 @@ foo (void) __builtin_stdc_bit_floor ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_bit_floor' operand not an integral type" } */ __builtin_stdc_bit_floor (); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_floor'" } */ __builtin_stdc_bit_floor (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_floor'" } */ - __builtin_stdc_bit_floor ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_bit_floor ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_bit_floor (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_bit_floor ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_floor' has boolean type" } */ + __builtin_stdc_bit_floor ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_floor' has enumerated type" } */ + __builtin_stdc_bit_floor (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_floor' has signed type" } */ __builtin_stdc_bit_ceil (0.0f); /* { dg-error "'__builtin_stdc_bit_ceil' operand not an integral type" } */ __builtin_stdc_bit_ceil (0.0); /* { dg-error "'__builtin_stdc_bit_ceil' operand not an integral type" } */ __builtin_stdc_bit_ceil (0.0L); /* { dg-error "'__builtin_stdc_bit_ceil' operand not an integral type" } */ @@ -144,7 +144,7 @@ foo (void) __builtin_stdc_bit_ceil ((struct S) { 0 }); /* { dg-error "'__builtin_stdc_bit_ceil' operand not an integral type" } */ __builtin_stdc_bit_ceil (); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_ceil'" } */ __builtin_stdc_bit_ceil (0U, 0U); /* { dg-error "wrong number of arguments to '__builtin_stdc_bit_ceil'" } */ - __builtin_stdc_bit_ceil ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has boolean type" } */ - __builtin_stdc_bit_ceil ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has enumerated type" } */ - __builtin_stdc_bit_ceil (0); /* { dg-error "argument 1 in call to function '__builtin_clzg' has signed type" } */ + __builtin_stdc_bit_ceil ((_Bool) 0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_ceil' has boolean type" } */ + __builtin_stdc_bit_ceil ((enum E) E0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_ceil' has enumerated type" } */ + __builtin_stdc_bit_ceil (0); /* { dg-error "argument 1 in call to function '__builtin_stdc_bit_ceil' has signed type" } */ }