From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8AA0D384A05B; Tue, 16 Jul 2024 22:14:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AA0D384A05B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1721168053; bh=pLOGJH9H+NPmcrj1rSi/172rLLoQKQMd0F4OsudMLSs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rCcqHy5Txogkvq40mGn7vdWX0ZppMf7fkN+9/0E/8uk3pyE8lDoemoqdqhe7BU59p U5NGfjoPrreCLLnLSapPuKI2LEOsXxjgkxazRiuj/Lk1ET7q7hYi4oW0HZpsX/bGNb cV5+s/Gkf4N0y3haMF1iEOQRSSeRlrupaxSxCwrw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115960] gcc throws an error when I use Optional in c++17. Date: Tue, 16 Jul 2024 22:14:13 +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: 15.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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=3D115960 --- Comment #2 from Andrew Pinski --- Anyways this is not a GCC issue. The AttrBuilder::addAllocSizeAttr is declared in the preprocessed source = as: AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg, const std::optional &NumElemsArg); But the upstream is defined as: AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg, const Optional &NumElemsArg); https://github.com/hdoc/llvm-project/blob/a38b25fa77bdf1437c690494ae6d61179= b3bb4f8/llvm/include/llvm/IR/Attributes.h#L1188 Also note https://github.com/llvm/llvm-project/commit/125f4457a54a550846732763ee36b14= 47ec8d66e Anyways this still not a GCC bug.=