public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20584] New: inline function used but never defined
@ 2005-03-22  2:41 nerijus at users dot sourceforge dot net
  2005-03-22  2:48 ` [Bug c++/20584] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: nerijus at users dot sourceforge dot net @ 2005-03-22  2:41 UTC (permalink / raw)
  To: gcc-bugs

When compiling wxWidgets I get a warning:
../wxWindows/include/wx/stattext.h:24: warning: inline function 'virtual
wxStaticTextBase::~wxStaticTextBase()' used but never defined

The code is:
class WXDLLEXPORT wxStaticTextBase : public wxControl
{
public:
    wxStaticTextBase() { }

    // overriden base virtuals
    virtual bool AcceptsFocus() const { return false; }
    virtual bool HasTransparentBackground() { return true; }

private:
    DECLARE_NO_COPY_CLASS(wxStaticTextBase)
};

I asked wxWidgets developer and he said "The others could be less clear but this
one is clearly bogus: compiler complains about dtor which it should generate
itself. Please report this as a gcc bug".

I am using gcc 4 from Fedora devel.

-- 
           Summary: inline function used but never defined
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nerijus at users dot sourceforge dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: gcc (GCC) 4.0.0 20050314 (Red Hat 4.0.0-0.34)
  GCC host triplet: gcc (GCC) 4.0.0 20050314 (Red Hat 4.0.0-0.34)
GCC target triplet: gcc (GCC) 4.0.0 20050314 (Red Hat 4.0.0-0.34)


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
@ 2005-03-22  2:48 ` pinskia at gcc dot gnu dot org
  2005-03-22  2:49 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  2:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 02:48 -------
gcc (GCC) 4.0.0 20050314 (Red Hat 4.0.0-0.34)

I don't think this is bogus, given the following code (since you did not give the preprocessed source I 
have to guess):
struct wxStaticTextBase
{
  wxStaticTextBase(){}
  virtual bool AcceptsFocus() const{return false;}
  inline virtual ~wxStaticTextBase();
};

See how ~wxStaticTextBase is declared as inline but not defined anywhere, so we get an error.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|gcc (GCC) 4.0.0 20050314    |
                   |(Red Hat 4.0.0-0.34)        |
   GCC host triplet|gcc (GCC) 4.0.0 20050314    |
                   |(Red Hat 4.0.0-0.34)        |
 GCC target triplet|gcc (GCC) 4.0.0 20050314    |i686-pc-linux-gnu
                   |(Red Hat 4.0.0-0.34)        |


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
  2005-03-22  2:48 ` [Bug c++/20584] " pinskia at gcc dot gnu dot org
@ 2005-03-22  2:49 ` pinskia at gcc dot gnu dot org
  2005-03-22  2:55 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  2:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 02:48 -------
(In reply to comment #1)
> See how ~wxStaticTextBase is declared as inline but not defined anywhere, so we get an error.

I mean warning.

-- 


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
  2005-03-22  2:48 ` [Bug c++/20584] " pinskia at gcc dot gnu dot org
  2005-03-22  2:49 ` pinskia at gcc dot gnu dot org
@ 2005-03-22  2:55 ` pinskia at gcc dot gnu dot org
  2005-03-22  3:04 ` nerijus at users dot sourceforge dot net
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  2:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 02:55 -------
Could read http://gcc.gnu.org/bugs.html and provide the preprocessed source as my guess shows that 
this warning is correct.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (2 preceding siblings ...)
  2005-03-22  2:55 ` pinskia at gcc dot gnu dot org
@ 2005-03-22  3:04 ` nerijus at users dot sourceforge dot net
  2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nerijus at users dot sourceforge dot net @ 2005-03-22  3:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nerijus at users dot sourceforge dot net  2005-03-22 03:04 -------
With  -v -save-temps:
$ ./bk-deps g++ -c -o coredll_progdlgg.o  -D__WXGTK__            -DWXUSINGDLL
-DWXMAKINGDLL_CORE -DwxUSE_BASE=0 -fPIC -DPIC -D__WXDEBUG__
-Ilib/wx/include/gtk2-ansi-debug-2.5 -I../wxWindows/include -DXTHREADS
-D_REENTRANT -DXUSE_MTSAFE_API -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -g -O0 -pthread -Wall -Wno-ctor-dtor-privacy
../wxWindows/src/generic/progdlgg.cpp -v -save-temps

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada
--enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050314 (Red Hat 4.0.0-0.34)
 /usr/libexec/gcc/i386-redhat-linux/4.0.0/cc1plus -E -quiet -v
-Ilib/wx/include/gtk2-ansi-debug-2.5 -I../wxWindows/include
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -MMD coredll_progdlgg.d -MQ coredll_progdlgg.o
-D_GNU_SOURCE -D_REENTRANT -D__WXGTK__ -DWXUSINGDLL -DWXMAKINGDLL_CORE
-DwxUSE_BASE=0 -DPIC -D__WXDEBUG__ -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1
../wxWindows/src/generic/progdlgg.cpp -Wall -Wno-ctor-dtor-privacy -fPIC
-fworking-directory -O0 -fpch-preprocess -o progdlgg.ii
ignoring nonexistent directory
"/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../i386-redhat-linux/include"
ignoring nonexistent directory "/usr/include/freetype2/config"
#include "..." search starts here:
#include <...> search starts here:
 lib/wx/include/gtk2-ansi-debug-2.5
 ../wxWindows/include
 /usr/include/gtk-2.0
 /usr/lib/gtk-2.0/include
 /usr/X11R6/include
 /usr/include/atk-1.0
 /usr/include/pango-1.0
 /usr/include/freetype2
 /usr/include/glib-2.0
 /usr/lib/glib-2.0/include
 /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0
 /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/i386-redhat-linux
 /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/backward
 /usr/local/include
 /usr/lib/gcc/i386-redhat-linux/4.0.0/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i386-redhat-linux/4.0.0/cc1plus -fpreprocessed progdlgg.ii
-quiet -dumpbase progdlgg.cpp -auxbase-strip coredll_progdlgg.o -g -O0 -Wall
-Wno-ctor-dtor-privacy -version -fPIC -o progdlgg.s
GNU C++ version 4.0.0 20050314 (Red Hat 4.0.0-0.34) (i386-redhat-linux)
	compiled by GNU C version 4.0.0 20050314 (Red Hat 4.0.0-0.34).
GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=96956
../wxWindows/include/wx/event.h:2171: warning: inline function
'wxEventTableEntry::wxEventTableEntry(const wxEventTableEntry&)' used but never
defined
../wxWindows/include/wx/stattext.h:24: warning: inline function 'virtual
wxStaticTextBase::~wxStaticTextBase()' used but never defined
../wxWindows/include/wx/stattext.h:24: warning: inline function 'virtual
wxStaticTextBase::~wxStaticTextBase()' used but never defined
../wxWindows/include/wx/window.h:113: warning: inline function 'virtual
wxWindowList::~wxWindowList()' used but never defined
../wxWindows/include/wx/window.h:113: warning: inline function 'virtual
wxWindowList::~wxWindowList()' used but never defined
 as -V -Qy -o coredll_progdlgg.o progdlgg.s
GNU assembler version 2.15.94.0.2 (i386-redhat-linux) using BFD version
2.15.94.0.2 20041220

Will attach progdlgg.ii.

-- 


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (3 preceding siblings ...)
  2005-03-22  3:04 ` nerijus at users dot sourceforge dot net
@ 2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
  2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  3:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 03:09 -------
Ok, this is not what I thought it was but something different, closing as invalid to .............

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c++/20584] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (4 preceding siblings ...)
  2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
@ 2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
  2005-03-22  3:10 ` [Bug c++/20584] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  3:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 03:09 -------
Move to unconfirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (5 preceding siblings ...)
  2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
@ 2005-03-22  3:10 ` pinskia at gcc dot gnu dot org
  2005-03-22  3:12 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  3:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 03:10 -------
This has to do with "#pragma implementation "

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
      Known to fail|                            |4.0.0 4.1.0
      Known to work|                            |3.3.3
            Summary|inline function used but    |[4.0/4.1 Regression] inline
                   |never defined               |function used but never
                   |                            |defined
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (6 preceding siblings ...)
  2005-03-22  3:10 ` [Bug c++/20584] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-03-22  3:12 ` pinskia at gcc dot gnu dot org
  2005-03-30 11:59 ` nerijus at users dot sourceforge dot net
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  3:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-22 03:12 -------
This started after 20040909.

-- 


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (7 preceding siblings ...)
  2005-03-22  3:12 ` pinskia at gcc dot gnu dot org
@ 2005-03-30 11:59 ` nerijus at users dot sourceforge dot net
  2005-04-05  1:44 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nerijus at users dot sourceforge dot net @ 2005-03-30 11:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nerijus at users dot sourceforge dot net  2005-03-30 11:59 -------
It seems I get these warnings only when precompiled headers are not used.

-- 


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (8 preceding siblings ...)
  2005-03-30 11:59 ` nerijus at users dot sourceforge dot net
@ 2005-04-05  1:44 ` pinskia at gcc dot gnu dot org
  2005-04-05 16:30 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-05  1:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (9 preceding siblings ...)
  2005-04-05  1:44 ` pinskia at gcc dot gnu dot org
@ 2005-04-05 16:30 ` pinskia at gcc dot gnu dot org
  2005-04-21  5:06 ` mmitchel at gcc dot gnu dot org
  2005-04-29 12:22 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-05 16:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19159
              nThis|                            |


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (10 preceding siblings ...)
  2005-04-05 16:30 ` pinskia at gcc dot gnu dot org
@ 2005-04-21  5:06 ` mmitchel at gcc dot gnu dot org
  2005-04-29 12:22 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-21  5:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |4.0.1


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


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

* [Bug c++/20584] [4.0/4.1 Regression] inline function used but never defined
  2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
                   ` (11 preceding siblings ...)
  2005-04-21  5:06 ` mmitchel at gcc dot gnu dot org
@ 2005-04-29 12:22 ` pinskia at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-29 12:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-29 12:21 -------


*** This bug has been marked as a duplicate of 21280 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-04-29 12:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22  2:41 [Bug c++/20584] New: inline function used but never defined nerijus at users dot sourceforge dot net
2005-03-22  2:48 ` [Bug c++/20584] " pinskia at gcc dot gnu dot org
2005-03-22  2:49 ` pinskia at gcc dot gnu dot org
2005-03-22  2:55 ` pinskia at gcc dot gnu dot org
2005-03-22  3:04 ` nerijus at users dot sourceforge dot net
2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
2005-03-22  3:09 ` pinskia at gcc dot gnu dot org
2005-03-22  3:10 ` [Bug c++/20584] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-03-22  3:12 ` pinskia at gcc dot gnu dot org
2005-03-30 11:59 ` nerijus at users dot sourceforge dot net
2005-04-05  1:44 ` pinskia at gcc dot gnu dot org
2005-04-05 16:30 ` pinskia at gcc dot gnu dot org
2005-04-21  5:06 ` mmitchel at gcc dot gnu dot org
2005-04-29 12:22 ` pinskia 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).