This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30583] [ODR] Non-static inline functions cause bugs when defined more than once in different files
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2007 19:15:56 -0000
- Subject: [Bug c++/30583] [ODR] Non-static inline functions cause bugs when defined more than once in different files
- References: <bug-30583-13987@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-28 19:15 -------
This is just an ODR (one definition rule) violation which does not need to be
diagnostic. In fact it might be hard to diagnostic this problem.
C++ defines inline functions as weak/varge linkage so the definition of the
uses across every TU (translation unit) have to be the same but no diagnostic
is required if they are different.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Component|c |c++
Summary|Non-static inline functions |[ODR] Non-static inline
|cause bugs when defined more|functions cause bugs when
|than once in different files|defined more than once in
| |different files
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30583