[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|WAITING |RESOLVED --- Comment #9 from Richard Biener --- I suppose so.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 Eric Gallager changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment #8 from Eric Gallager --- (In reply to CVS Commits from comment #7) > The releases/gcc-10 branch has been updated by Richard Biener > : > > https://gcc.gnu.org/g:a24d9b5bbb6a298ff4e55d731d5e436b0da9e38a > > commit r10-8169-ga24d9b5bbb6a298ff4e55d731d5e436b0da9e38a > Author: Richard Biener > Date: Tue May 19 08:36:13 2020 +0200 > > lto/95190 - amend -flto docs for diagnostic option handling > > This documents new GCC 10 behavior on diagnostic options and -flto. > > 2020-05-22 Richard Biener > > PR lto/95190 > * doc/invoke.texi (flto): Document behavior of diagnostic > options. > > (cherry picked from commit ab7eca92926fdc1da880120c116a1832fce56a29) so... FIXED now?
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #7 from CVS Commits --- The releases/gcc-10 branch has been updated by Richard Biener : https://gcc.gnu.org/g:a24d9b5bbb6a298ff4e55d731d5e436b0da9e38a commit r10-8169-ga24d9b5bbb6a298ff4e55d731d5e436b0da9e38a Author: Richard Biener Date: Tue May 19 08:36:13 2020 +0200 lto/95190 - amend -flto docs for diagnostic option handling This documents new GCC 10 behavior on diagnostic options and -flto. 2020-05-22 Richard Biener PR lto/95190 * doc/invoke.texi (flto): Document behavior of diagnostic options. (cherry picked from commit ab7eca92926fdc1da880120c116a1832fce56a29)
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #6 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:ab7eca92926fdc1da880120c116a1832fce56a29 commit r11-565-gab7eca92926fdc1da880120c116a1832fce56a29 Author: Richard Biener Date: Tue May 19 08:36:13 2020 +0200 lto/95190 - amend -flto docs for diagnostic option handling This documents new GCC 10 behavior on diagnostic options and -flto. 2020-05-22 Richard Biener PR lto/95190 * doc/invoke.texi (flto): Document behavior of diagnostic options.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #5 from Mario Charest --- On Tue, May 19, 2020 at 2:35 AM rguenth at gcc dot gnu.org < gcc-bugzi...@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 > > --- Comment #2 from Richard Biener --- > This is new behavior for warnings in GCC 10 and now how all other > optimization > options behave - the option state is fixed per function at compile-time and > carried over to link-time. > > Indeed warning options are not mentioned in the docs, let me fix that. > Great! Thanks, may I suggest adding it the changes and portings web page. This new behavior may required tweaking of build files. > -- > You are receiving this mail because: > You reported the bug.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #4 from Mario Charest --- On Mon, May 18, 2020 at 1:09 PM msebor at gcc dot gnu.org < gcc-bugzi...@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 > > 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 during > 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.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #3 from Martin Liška --- > "writing 1 bytes into a region of size 0 -Wstringop-overflow=". Yet > -Wno-stringop-overflow is passed to the compiler. I tried disabling the > warning with #pragma diagnostic, no luck there. I must confirm that '#pragma diagnostic' is completely unsupported by LTO and I spent some time tweaking into it. Eventually, I bailed out.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 --- Comment #2 from Richard Biener --- This is new behavior for warnings in GCC 10 and now how all other optimization options behave - the option state is fixed per function at compile-time and carried over to link-time. Indeed warning options are not mentioned in the docs, let me fix that.
[Bug lto/95190] Documentation for -Wstringop-overflow
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190 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? During LTO the same compiler options should be implicitly enabled as during ordinary compilation, including warnings. (This presents some challenges when the compilation was done with different options for different files.) 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?