public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Bas Wijnen <shevek@fmf.nl>
To: gcc-gnats@gcc.gnu.org, <debian-gcc@lists.debian.org>
Subject: c++/7311: inline functions do not give control reaches end of non-void function in g++
Date: Mon, 15 Jul 2002 05:36:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0207151425500.18304-100000@fmf01.fwn.rug.nl> (raw)


>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++


             reply	other threads:[~2002-07-15 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15  5:36 Bas Wijnen [this message]
2002-07-15  6:26 Andrew Pinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0207151425500.18304-100000@fmf01.fwn.rug.nl \
    --to=shevek@fmf.nl \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).