From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E53CC385415B; Wed, 26 Apr 2023 08:37:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E53CC385415B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682498265; bh=sd4i8M//0jPSZYIayDq/+Sdd7ScbT6dAB6MSzk/jIic=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ct6s6B5F1gQu8TCJQHSlkH5C4Jj693/vILd2hHI0H3jWZ3wH5QQE4r0lPyJcqDchf uQWUheliDghhbEm1ScdDQ475eT6pkUB2Q3n7LqyC6Kv2mk4kBZ+XNSF+BUeqbomNVN o/8i73cbcU843uVDKk1P2fMey/TNkkkx4L7H4BYI= From: "cvs-commit at gcc dot 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: Wed, 26 Apr 2023 08:37:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic, openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107041 --- Comment #8 from CVS Commits --- The releases/gcc-13 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f8646b8dcb18721e776c39117f62aee7ee571f21 commit r13-7246-gf8646b8dcb18721e776c39117f62aee7ee571f21 Author: Jakub Jelinek 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 , 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 usi= ng 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 PR c/107041 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-misma= tch warning on acc_on_device declaration. * gcc.dg/goacc/pr107041.c: New test. (cherry picked from commit 3d7ab53d6c59499624aa41c8dea0664976820b3b)=