[Bug c++/30583] [ODR] Non-static inline functions cause bugs when defined more than once in different files
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 12 10:49:00 GMT 2007
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-02-12 10:49 -------
To dect an ODR violation in this case, means a couple of things. First you
cannot compare byte for byte the function as one might be compiled with
optimizations and the other was compiled without. And then if you just compare
the size you run into the same problem because the funcitons might be optimized
differently.
Binutils at one tried adding that and guess what, it was warning all the time
on libstdc++ because optimization differences. It was only doing guesses based
on the size and not even based on byte for byte comparision.
This is a hard problem to solve really which is why the standard mentions that
this invalid does not have to be errored about.
Also it is really hard to do in the compiler when we don't do any link time
optimization at this point anyways.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30583
More information about the Gcc-bugs
mailing list