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

            Bug ID: 116712
           Summary: -Wlto-type-mismatch should show how the types differ
                    (just like -Wodr does)
           Product: gcc
           Version: 14.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brunopitrus at hotmail dot com
  Target Milestone: ---

Right now, -Wlto-type-mismatch only shows you where the types were declared:

../../third_party/electron_node/src/tracing/agent.h:133: warning: type of
'Disconnect' does not match original declaration [-Wlto-type-mismatch]
  133 |   void Disconnect(int client);
../../third_party/electron_node/src/tracing/agent.cc:162: note: 'Disconnect'
was previously declared here
  162 | void Agent::Disconnect(int client) {


This is useless for diagnosis when the root cause was headers compiled with
mismatching preprocessor flags. (Even something like bug 116344 would have
slightly helped as you could then run the preprocessor on both fles)

Reply via email to