https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
--- Comment #7 from Jakub Jelinek ---
We could in theory save the tokens of each method and compare them, but it
would be quite costly.
Normally people don't cut'n'paste classes between TUs, but rather just declare
them once in a header they incl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
--- Comment #6 from Andrew Pinski ---
Yes, this is a vague linkage function so as jakub mentioned, comparing the ir
even between optimization levels is hard. Yes we could in theory it could be
done but for gcc, it would mean ripping up most of t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
--- Comment #5 from Jakub Jelinek ---
Yes, you haven't read my comment which explained what -Wodr does and doesn't
and why.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
--- Comment #4 from Geetesh More ---
I tried with -flto, but I'm not seeing any warning messages:
g++ -std=c++0x -g -flto -Wodr main.cpp file2.cpp
Am I missing anything here?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
--- Comment #2 from Geetesh More ---
But compiler should be throwing some message/warning about declaration of same
class in multiple files. This is common scenario in cases where a class is
copied in multiple files.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92986
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #1