public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7311: inline functions do not give control reaches end of non-void function in g++
@ 2002-07-15  5:36 Bas Wijnen
  0 siblings, 0 replies; 2+ messages in thread
From: Bas Wijnen @ 2002-07-15  5:36 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


>Number:         7311
>Category:       c++
>Synopsis:       inline functions do not give control reaches end of
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 15 05:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bas Wijnen
>Release:        3.0.4 (Debian testing/unstable)
>Organization:
>Environment:
System: Linux termpje 2.4.18 #14 Fri Jun 21 13:06:58 CEST 2002 i686 
unknown
Architecture: i686

        
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,proto,obj
c --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared 
--with
-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls 
--witho
ut-included-gettext --disable-checking --enable-threads=posix 
--enable-java-gc=b
oehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux

>Description:
When defining a function inline in a class and no returnvalue is given, 
while
it should not be void, there is no warning, not even with -Wall.

>How-To-Repeat:
compile this:

class foo
{
public:
  int bar ()
  {
  }
};

int main ()
{
  foo f;
  f.bar ();
  return 0;
}

with g++ -Wall -Wshadow -ansi -O5 -ggdb3 bug.cc
and see no warnings
>Fix:
a workaround obviously is to give a returnvalue. However finding such an
error is not easy without the warning, especially because it is expected.


>Release-Note:
>Audit-Trail:
>Unformatted:
 non-void fun
 ction in g++


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

* Re: c++/7311: inline functions do not give control reaches end of non-void function in g++
@ 2002-07-15  6:26 Andrew Pinski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Pinski @ 2002-07-15  6:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/7311; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: Bas Wijnen <shevek@fmf.nl>
Cc: gcc-gnats@gcc.gnu.org, <debian-gcc@lists.debian.org>
Subject: Re: c++/7311: inline functions do not give control reaches end of non-void function in g++
Date: Mon, 15 Jul 2002 09:19:50 -0400

 This has been fixed in gcc version 3.3 20020713 (experimental) at least.
 
 Thanks,
 Andrew Pinski
 
 On Monday, July 15, 2002, at 08:30 , Bas Wijnen wrote:
 
 > class foo
 > {
 > public:
 >   int bar ()
 >   {
 >   }
 > };
 >
 > int main ()
 > {
 >   foo f;
 >   f.bar ();
 >   return 0;
 > }
 


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

end of thread, other threads:[~2002-07-15 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15  5:36 c++/7311: inline functions do not give control reaches end of non-void function in g++ Bas Wijnen
2002-07-15  6:26 Andrew Pinski

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).