https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95190

Martin Sebor <msebor at gcc dot gnu.org> 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 <msebor at gcc dot gnu.org> ---
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?

Reply via email to