public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/111309] va_arg alternative for _BitInt
Date: Mon, 20 Nov 2023 16:55:50 +0000	[thread overview]
Message-ID: <bug-111309-4-p4dtl1ZeKa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111309-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111309

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Does
2023-11-20  Jakub Jelinek  <jakub@redhat.com>

        PR c/111309
        * c-c++-common/pr111309-2.c (foo): Don't expect errors for C++ with
        -fshort-enums if second argument is E0.

--- gcc/testsuite/c-c++-common/pr111309-2.c.jj  2023-11-14 10:52:16.191276028
+0100
+++ gcc/testsuite/c-c++-common/pr111309-2.c     2023-11-20 17:52:30.606386073
+0100
@@ -32,7 +32,7 @@ foo (void)
   __builtin_clzg (0U, 2LL);    /* { dg-error "does not have 'int' type" } */
   __builtin_clzg (0U, 2U);     /* { dg-error "does not have 'int' type" } */
   __builtin_clzg (0U, true);
-  __builtin_clzg (0U, E0);     /* { dg-error "does not have 'int' type" "" {
target c++ } } */
+  __builtin_clzg (0U, E0);     /* { dg-error "does not have 'int' type" "" {
target { c++ && { ! short_enums } } } } */
   __builtin_ctzg ();           /* { dg-error "too few arguments" } */
   __builtin_ctzg (0U, 1, 2);   /* { dg-error "too many arguments" } */
   __builtin_ctzg (0);          /* { dg-error "has signed type" } */
@@ -51,7 +51,7 @@ foo (void)
   __builtin_ctzg (0U, 2LL);    /* { dg-error "does not have 'int' type" } */
   __builtin_ctzg (0U, 2U);     /* { dg-error "does not have 'int' type" } */
   __builtin_ctzg (0U, true);
-  __builtin_ctzg (0U, E0);     /* { dg-error "does not have 'int' type" "" {
target c++ } } */
+  __builtin_ctzg (0U, E0);     /* { dg-error "does not have 'int' type" "" {
target { c++ && { ! short_enums } } } } */
   __builtin_clrsbg ();         /* { dg-error "too few arguments" } */
   __builtin_clrsbg (0, 1);     /* { dg-error "too many arguments" } */
   __builtin_clrsbg (0U);       /* { dg-error "has unsigned type" } */
fix that?  For -fshort-enums in C++ E0 has smaller precision than int and so
eventhough it is unsigned, it is (or would be) promoted to int.

  parent reply	other threads:[~2023-11-20 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 17:05 [Bug c/111309] New: " jakub at gcc dot gnu.org
2023-09-06 17:29 ` [Bug c/111309] " joseph at codesourcery dot com
2023-09-06 17:40 ` jakub at gcc dot gnu.org
2023-09-06 17:47 ` joseph at codesourcery dot com
2023-11-14  9:52 ` cvs-commit at gcc dot gnu.org
2023-11-20 10:31 ` clyon at gcc dot gnu.org
2023-11-20 16:55 ` jakub at gcc dot gnu.org [this message]
2023-11-21  9:04 ` cvs-commit at gcc dot gnu.org

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=bug-111309-4-p4dtl1ZeKa@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).