public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17256] New: undefined but used static or inline functions should be diagnosed
@ 2004-09-01  0:06 jsm28 at gcc dot gnu dot org
  2005-06-13 13:52 ` [Bug c++/17256] [3.4/4.0/4.1 Regression] " phython at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-09-01  0:06 UTC (permalink / raw)
  To: gcc-bugs

inline static void f1(void);
void g1(void) { if (0) { f1(); } }

violates the requirement that "An inline function shall be defined in every
translation unit in which it is used." [basic.odr] paragraph 3, so should be
diagnosed ("used" having a specific definition which covers this case).
The diagnostic should be a pedwarn rather than the existing warning for
inline functions that aren't defined.

Much the same code would probably also facilitate diagnosing the simple
ODR violation, no diagnostic required, where "inline" is removed from
the declaration of f1.

-- 
           Summary: undefined but used static or inline functions should be
                    diagnosed
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17256


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-11-10 18:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-17256-230@http.gcc.gnu.org/bugzilla/>
2005-10-11  6:41 ` [Bug c++/17256] [3.4/4.0/4.1 Regression] undefined but used static or inline functions should be diagnosed phython at gcc dot gnu dot org
2005-10-11  6:42 ` phython at gcc dot gnu dot org
2005-10-29  1:50 ` jason at gcc dot gnu dot org
2005-10-30 22:51 ` mmitchel at gcc dot gnu dot org
2005-11-03 22:12 ` janis at gcc dot gnu dot org
2005-11-07  6:17 ` jason at gcc dot gnu dot org
2005-11-07 13:17 ` [Bug c++/17256] [3.4/4.0 " pinskia at gcc dot gnu dot org
2005-11-10 18:32 ` jason at gcc dot gnu dot org
2004-09-01  0:06 [Bug c++/17256] New: " jsm28 at gcc dot gnu dot org
2005-06-13 13:52 ` [Bug c++/17256] [3.4/4.0/4.1 Regression] " phython at gcc dot gnu dot org
2005-07-22 21:15 ` pinskia at gcc dot gnu dot org
2005-09-07 19:11 ` pinskia at gcc dot gnu dot org
2005-09-27 16:19 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).