From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B3DBE3955698; Tue, 19 May 2020 16:29:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3DBE3955698 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589905758; bh=ZOTO3v47TT9tSA37uQZAoC7tcrcQ7Y1J5M9N8MACtL4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=s98MC+9wWRApJc+/Yxs/DtvH2QYq8ouRSWELcQzfROuCdmYdutul51PNFMnMtJ60V q/s44FsrZOPXLMqED7DQz3z8sOgZDc2g1AtElvM7sNK6QpXV0FxzkH0hlHEssRGBH8 6CGC0iFl/vy1Gu8+qly273LE4NQeD8+QWI/UJ3mA= From: "stayprivate at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/95190] Documentation for -Wstringop-overflow Date: Tue, 19 May 2020 16:29:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: diagnostic, documentation, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: stayprivate at gmail dot com X-Bugzilla-Status: WAITING 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2020 16:29:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95190 --- Comment #4 from Mario Charest --- On Mon, May 18, 2020 at 1:09 PM msebor at gcc dot gnu.org < gcc-bugzilla@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95190 > > Martin Sebor changed: > > What |Removed |Added > > -------------------------------------------------------------------------= --- > Last reconfirmed| |2020-05-18 > Status|UNCONFIRMED |WAITING > Component|c++ |lto > Ever confirmed|0 |1 > CC| |marxin at gcc dot gnu.org > , > | |msebor at gcc dot gnu.org > Keywords| |documentation > > --- Comment #1 from Martin Sebor --- > Which part do you find surprising? That the warning is issued during the > LTO > stage at all or that -Wno-stringop-overflow can be used during the LTO > stage to > suppress it? > Mostly the LTO stage. I got bitten because I assumed warning came from the compiler. If the LTO stage would have handle #pragma diagnostic i would have never noticed where it came from. > > During LTO the same compiler options should be implicitly enabled as duri= ng > ordinary compilation, including warnings. (This presents some challenges > when > the compilation was done with different options for different files.) > Most project with cmake using lto will required tweaking. Typically warning options are specified with add_compiler_options(). Now every warning flags must also be passed to the linker, impossible to know which flag has an effect on the LTO stage or not. > It also means that all the same warnings should be expected to be > implicitly > enabled during LTO that were explicitly enabled during the compilation > stage. > I'd expect to see only "late" warnings during LTO, i.e., those that depend > on > optimization. (I understand this doesn't work completely consistently yet > but > I believe that's the goal.) > > So this effect isn't specific to -Wstringop-overflow, but perhaps it would > be > worth mentioning under -flto? > > -- > You are receiving this mail because: > You reported the bug.=