[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#119440: marked as done (g++: Compiler does not give any errors when a function fails to return required value)



Your message dated Sun, 2 Jun 2002 01:21:51 +0200
with message-id <15609.22287.943122.751182@gargle.gargle.HOWL>
and subject line clsoing gcc report
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 13 Nov 2001 15:55:40 +0000
>From erayo@cs.bilkent.edu.tr Tue Nov 13 09:55:39 2001
Return-path: <erayo@cs.bilkent.edu.tr>
Received: from venus1.ttnet.net.tr [212.156.4.3] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 163fuV-0008Ai-00; Tue, 13 Nov 2001 09:55:39 -0600
Received: from orion.exa.homeip.net ([195.174.160.184]) by
          venus1.ttnet.net.tr (Netscape Messaging Server 4.15) with ESMTP
          id GMQXKI01.Y7M; Tue, 13 Nov 2001 18:55:30 +0300 
Received: from exa by orion.exa.homeip.net with local (Exim 3.32 #1 (Debian))
	id 163ft9-0005i2-00; Tue, 13 Nov 2001 17:54:15 +0200
From: "Eray Ozkural (exa)" <erayo@cs.bilkent.edu.tr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: g++: Compiler does not give any errors when a function fails to return required value
X-Reportbug-Version: 1.31
X-Mailer: reportbug 1.31
Date: Tue, 13 Nov 2001 17:54:14 +0200
Message-Id: <E163ft9-0005i2-00@orion.exa.homeip.net>
Sender: Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr>
Delivered-To: submit@bugs.debian.org

Package: g++
Version: 2:2.95.4-8
Severity: normal

In a member function such as:
int Partition::in_which_part()
{
  int i;
  ....
}

A return statement with type of int is required. However, the compiler
fails to give any error/warning when the corresponding return statement
is omitted, when invoked with default options.

In the current case, the compiler does not even give a warning message
by default. Giving an error message might break valid C++ code (which
I'm not sure of) but it seems that when you specify -Wall the compiler
will detect whether
src/generic/Utility.hxx:173: warning: control reaches end of non-void function `Utility::operator <<<int, less<int> >(ostream &, const set<int,less<int>,allocator<int> > &)'

I think this should be the default behavior, which may be suppressed
with a flag if desired.

Thanks,

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux orion 2.4.7 #1 Tue Jul 31 12:20:28 EEST 2001 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages g++ depends on:
ii  cpp                    2:2.95.4-8        The GNU C preprocessor.
ii  g++-2.95               1:2.95.4-0.011006 The GNU C++ compiler.
ii  gcc-2.95               1:2.95.4-0.011006 The GNU C compiler.


---------------------------------------
Received: (at 119440-done) by bugs.debian.org; 1 Jun 2002 23:22:37 +0000
>From doko@cs.tu-berlin.de Sat Jun 01 18:22:37 2002
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [130.149.17.13] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17EICi-0000ax-00; Sat, 01 Jun 2002 18:22:36 -0500
Received: from bolero.cs.tu-berlin.de (daemon@bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id BAA14209
	for <119440-done@bugs.debian.org>; Sun, 2 Jun 2002 01:21:52 +0200 (MET DST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.11.6+Sun/8.9.3) id g51NLqo28224;
	Sun, 2 Jun 2002 01:21:52 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15609.22287.943122.751182@gargle.gargle.HOWL>
Date: Sun, 2 Jun 2002 01:21:51 +0200
To: 119440-done@bugs.debian.org
Subject: clsoing gcc report
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
Delivered-To: 119440-done@bugs.debian.org

Martin v. Loewis writes:
> I still propose to close this. GCC maintainers will never accept a
> change in this respect.

Doing so.


-- 
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: