From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AAF053858C35; Thu, 5 Oct 2023 20:51:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAF053858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696539068; bh=Ug9+2OGbdToMbkoz54WH4b6HA1ZSLjyKotlpbSGPinA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SRX81fuPxieA8ASFlQzGZXFCSOgLc7i+fEj77JGkb6SWef00+Ze95FkboTX0hSPdj zZ94wgkUHoI0p7Rp6M2HiV056QAJ1tpdz2YZwTvVyiHXCqm+dyx1p7DceFM74ENXYj lr9sKvS+wtgqPLwhRcOPxtU5G25fNFZ38yblpDNM= From: "nicolas.werner at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100135] [modules] ICE when using constants in a module Date: Thu, 05 Oct 2023 20:51:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: nicolas.werner at hotmail dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D100135 --- Comment #2 from Nicolas Werner --- Possibly the gcc behaviour here is correct. There is a clang bug open for it not rejecting calls to functions with default parameters, when the default parameter is not exported: https://github.com/llvm/llvm-project/issues/57459 However possibly that should only be an error at the call site instead of w= hen compiling the module with that function declaration, when the function parameter can be legally specified at the call site. For example for foo(in= t i =3D unexported_constant) a call to foo(5) could be legal, even if only foo = but not unexported_constant is exported? Not sure what the standard says on tha= t, it sounds similar to CWG2631.=