From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C572386103C; Mon, 22 Jan 2024 17:35:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C572386103C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705944943; bh=1XEd5UDvXcZjFkCU38/66FY31ucLeXm1J8srXCZVwLY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I1Oa6vT/GKyh0TJc0FmGogqvGqGQ5FxdrQ2qaKJY7lOjGSjCk0iX/cBmfO3KZmqpk hRp8du6uaB6ytlvnqO9omDr1MvrO+IobW51wUelywyxoaYfZKCse2kIQd2txRpHRxe JaZ58tMXXhz4G4lEx+6mr3+l/C9G3w4DZgPNBiGE= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/113152] Fortran 2023 half-cycle trigonometric functions Date: Mon, 22 Jan 2024 17:35:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D113152 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #16 from anlauf at gcc dot gnu.org --- (In reply to Steve Kargl from comment #14) > On Sun, Jan 21, 2024 at 09:52:39PM +0000, anlauf at gcc dot gnu.org wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113152 > >=20 > > I think that you cannot do > >=20 > > + if (MPFR_HALF_CYCLE) > >=20 > > you really must use > >=20 > > #if MPFR_HALF_CYCLE > >=20 >=20 > #include > #include "mpfr.h" >=20 > #define MPFR_HALF_CYCLE (MPFR_VERSION_MAJOR * 100 + MPFR_VERSION_MINOR >= =3D > 402) >=20 > int > main(void) > { > if (MPFR_HALF_CYCLE) > printf("here\n"); > else > printf("there\n"); > return (0); > } >=20 > % cc -o z -I/usr/local/include a.c && ./z This does not test the right thing. % cat sgk.cc #include #define MPFR_HALF_CYCLE 0 int main(void) { if (MPFR_HALF_CYCLE) printf_not_declared_if_0 ("here\n"); else printf ("there\n"); return (0); } % g++ sgk.cc sgk.cc: In function 'int main()': sgk.cc:9:7: error: 'printf_not_declared_if_0' was not declared in this scope printf_not_declared_if_0 ("here\n"); ^~~~~~~~~~~~~~~~~~~~~~~~=