From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 143EE3858CDA; Mon, 23 Oct 2023 08:05:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 143EE3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698048327; bh=EDPYRkKuNl3G6SdaPXllcEXSWN5Kwbq+8S89uXPuh5s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pkS7TzAQLlpiQdRyMkD9dbaud3if2hGgonqPJuK9Nk+SPjsmfVp5FSR8awpQZfljA HpaoC9QDKq+DGviPxephUyzz3O4hQbX07KOau6y7E/N47BpJkr6oTcLUQ66vO+QAt6 GlryX2izNTeS0ZSAAFe2bj1UdhxY75Y0s975Ss9s= From: "stsp at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111923] default argument is not treated as a complete-class context of a class Date: Mon, 23 Oct 2023 08:05:26 +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: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stsp at users dot sourceforge.net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D111923 --- Comment #7 from Stas Sergeev --- Also I verified your assumption in comment #5 by this code: struct A { struct dummy { static constexpr const int foo(const int off =3D offsetof(A, a)) { = return off; } static constexpr const int operator()() { return foo(); } }; static constexpr const int (*off_p)() =3D &dummy::operator(); int t[off_p()]; char a; }; It says: error: size of array =E2=80=98t=E2=80=99 is not an integral constant-expres= sion 11 | int t[off_p()]; So it seems, "constexpr const" is not enough to alter the structure size, so your fears about that were likely wrong. So could you please explain why note4 doesn't apply to the nested closure type? Unless there is a consistent explanation, the chances are that the bug is missed. :(=