public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/107041] [13/14 Regression] C '-Wenum-int-mismatch' diagnostic for OpenACC 'acc_on_device' Date: Thu, 20 Apr 2023 17:30:54 +0000 [thread overview] Message-ID: <bug-107041-4-KGZibtznIL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107041-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107041 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:3d7ab53d6c59499624aa41c8dea0664976820b3b commit r14-120-g3d7ab53d6c59499624aa41c8dea0664976820b3b Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Apr 20 19:26:17 2023 +0200 c: Avoid -Wenum-int-mismatch warning for redeclaration of builtin acc_on_device [PR107041] The new -Wenum-int-mismatch warning triggers with -Wsystem-headers in <openacc.h>, for obvious reasons the builtin acc_on_device uses int type argument rather than enum which isn't defined yet when the builtin is created, while the OpenACC spec requires it to have acc_device_t enum argument. The header makes sure it has int underlying type by using negative and __INT_MAX__ enumerators. I've tried to make the builtin typegeneric or just varargs, but that changes behavior e.g. when one calls it with some C++ class which has cast operator to acc_device_t, so the following patch instead disables the warning for this builtin. 2023-04-20 Jakub Jelinek <jakub@redhat.com> PR c/107041 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch warning on acc_on_device declaration. * gcc.dg/goacc/pr107041.c: New test.
next prev parent reply other threads:[~2023-04-20 17:30 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-26 13:42 [Bug libgomp/107041] New: [13 " tschwinge at gcc dot gnu.org 2022-09-27 8:50 ` [Bug libgomp/107041] " rguenth at gcc dot gnu.org 2022-12-22 14:35 ` rguenth at gcc dot gnu.org 2023-03-27 13:55 ` rguenth at gcc dot gnu.org 2023-04-17 15:23 ` [Bug libgomp/107041] [13/14 " jakub at gcc dot gnu.org 2023-04-17 17:36 ` jakub at gcc dot gnu.org 2023-04-18 8:39 ` jakub at gcc dot gnu.org 2023-04-20 17:30 ` cvs-commit at gcc dot gnu.org [this message] 2023-04-26 6:56 ` rguenth at gcc dot gnu.org 2023-04-26 8:37 ` cvs-commit at gcc dot gnu.org 2023-04-26 8:38 ` jakub 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-107041-4-KGZibtznIL@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: linkBe 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).