From nobody Wed Jan 31 08:56:22 2024 X-Original-To: toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPwr805CVz58n8f for ; Wed, 31 Jan 2024 08:56:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPwr768Mhz45xk for ; Wed, 31 Jan 2024 08:56:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706691383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vInKEcNyOmaEZTahopXleo8Ee+Qrplo9xhZoddYSa/w=; b=IqKmya3ni5jLyp8GVa5r40feGsOwzrNN/ZZdTxB+Cz0tJ6paC9Tzbk+55BZjOG+dW057oo QaUftQ/JGd6Ta9Wc3GIaBR8WzPQ7k1EPzw+EpPg9pCRJ+nyRaDDoNHtVoZhZBhVdmNnaj+ rhrhKg2Zk1QaD+EQmuBiy2Yumqx5Yff0gSTXB3cXdxIOs3RGoHPD9sRk7z/OpVWENdIj6B aS+jkpyogoDkjDFDOk5GujMfPrgw1oRmYfeq+ogSNJPuqL/jsReYyEl2ZX65aO5Y8JUlOy DIP3Dgp7fFvXxv7EeR5flaEIbCuZNDVXyT2V8JZ/59Q9wcw97v/YSXOvFfPxlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706691383; a=rsa-sha256; cv=none; b=Q/m8xnAwjTsNIzjOGtyUaYkO+s9AEN3lMl+AoRYpetSsa5KNhOnbkB+l02t/HhRcC7vtQE JvoZtmqJa0Mh1dh+AWz+kuMaVnqQgeXI+Ze6darY2M8y6KnknhBcMesWbqTvtQQcK5EPtT WGLs7O3ixOgl19hufQq6Q9znyjJJLBa98zqUm2466UHV1WP+Q+yMr3x0ML8v+g4HkQx0mB 9cbicV6nCAFLd95HpW3WG/cKU30+Cxqgp/3y1eNFqgC5wL6LMsoX6ywjDOy/kjNE+ZrSmm 7jEdnVdLYma/ippY1Gf2JJGWUj0ZSVdNxTeh8kc2QzZaCSi8Qzx1vijK5lq1xA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPwr75Ch3z1BrL for ; Wed, 31 Jan 2024 08:56:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40V8uNlx097816 for ; Wed, 31 Jan 2024 08:56:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40V8uN9Y097815 for toolchain@FreeBSD.org; Wed, 31 Jan 2024 08:56:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 276738] clang: static_assert conflicts with -std=c++98 -pedantic-errors Date: Wed, 31 Jan 2024 08:56:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: henri@henrimenke.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org 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: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276738 --- Comment #3 from Henri Menke --- I have narrowed this down a bit more. The following code doesn't preprocess correctly #include //#undef _Static_assert static_assert(random_template, "oops"); When running the preprocessor (with -E) I get $ c++ -std=3Dc++98 -pedantic-errors -E test.cpp >/dev/null test.cpp:3:43: error: too many arguments provided to function-like macro invocation 3 | static_assert(random_template, "oops"); | ^ /usr/include/sys/cdefs.h:282:9: note: macro '_Static_assert' defined here 282 | #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) | ^ 1 error generated. If I uncomment the #undef _Static_assert it preprocesses correctly and upon compiling it gives the expected compiler error that static_assert is not available. --=20 You are receiving this mail because: You are the assignee for the bug.=