Your message dated Sun, 30 Oct 2005 07:32:12 -0500 with message-id <[EMAIL PROTECTED]> and subject line Bug#336406: g++-4.0: problem when string function fails to return string 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; 30 Oct 2005 02:42:02 +0000 >From [EMAIL PROTECTED] Sat Oct 29 19:42:02 2005 Return-path: <[EMAIL PROTECTED]> Received: from ms-smtp-03.texas.rr.com (ms-smtp-03-eri0.texas.rr.com) [24.93.47.42] by spohr.debian.org with esmtp (Exim 3.36 1 (Debian)) id 1EW390-0000px-00; Sat, 29 Oct 2005 19:42:02 -0700 Received: from johnson.ethernet.homemail.org (cpe-67-11-180-132.satx.res.rr.com [67.11.180.132]) by ms-smtp-03-eri0.texas.rr.com (8.12.10/8.12.7) with ESMTP id j9U2fxRZ027609 for <[EMAIL PROTECTED]>; Sat, 29 Oct 2005 21:41:59 -0500 (CDT) Received: from ross by johnson.ethernet.homemail.org with local (Exim 4.54) id 1EW38x-0002LS-5S; Sat, 29 Oct 2005 21:41:59 -0500 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ross Johnson <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Subject: g++-4.0: problem when string function fails to return string X-Mailer: reportbug 3.17 Date: Sat, 29 Oct 2005 21:41:59 -0500 Message-Id: <[EMAIL PROTECTED]> X-Virus-Scanned: Symantec AntiVirus Scan Engine Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Level: X-Spam-Status: No, hits=-7.5 required=4.0 tests=BAYES_00,HAS_PACKAGE, RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02 Package: g++-4.0 Version: 4.0.2-2 Severity: normal In the following 4-line program, Test() fails to return a string (as promised) and no compiler warning is given. If executed, this program seg faults. It seems to me that either the compiler should provide a warning or the string library should not crash. #include <string> using namespace std; string Test (int i) { } main (int argc, char *argv[]) { Test(0); } -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-1-k7 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages g++-4.0 depends on: ii gcc-4.0 4.0.2-2 The GNU C compiler ii gcc-4.0-base 4.0.2-2 The GNU Compiler Collection (base ii libc6 2.3.5-6 GNU C Library: Shared libraries an ii libstdc++6-4.0-dev 4.0.2-2 The GNU Standard C++ Library v3 (d g++-4.0 recommends no packages. -- no debconf information --------------------------------------- Received: (at 336406-done) by bugs.debian.org; 30 Oct 2005 12:32:44 +0000 >From [EMAIL PROTECTED] Sun Oct 30 04:32:44 2005 Return-path: <[EMAIL PROTECTED]> Received: from rwcrmhc11.comcast.net [204.127.198.35] by spohr.debian.org with esmtp (Exim 3.36 1 (Debian)) id 1EWCMe-0001Ua-00; Sun, 30 Oct 2005 04:32:44 -0800 Received: from parity.ne.client1.attbi.com (c-65-96-253-225.hsd1.ma.comcast.net[65.96.253.225]) by comcast.net (rwcrmhc11) with ESMTP id <2005103012321301300asr5le>; Sun, 30 Oct 2005 12:32:13 +0000 Received: from localhost ([127.0.0.1]) by parity.ne.client1.attbi.com with esmtp (Exim 3.36 #1 (Debian)) id 1EWCM9-0007MQ-00 for <[EMAIL PROTECTED]>; Sun, 30 Oct 2005 07:32:13 -0500 Subject: Re: Bug#336406: g++-4.0: problem when string function fails to return string From: Jeremy Nimmer <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Content-Type: text/plain Date: Sun, 30 Oct 2005 07:32:12 -0500 Message-Id: <[EMAIL PROTECTED]> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Level: X-Spam-Status: No, hits=-5.5 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER, RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02 On Sat, 2005-10-29 at 21:41 -0500, Ross Johnson wrote: > In the following 4-line program, Test() fails to return a string > (as promised) and no compiler warning is given. If executed, > this program seg faults. It seems to me that either the compiler > should provide a warning It does; you just have to turn on warnings. > or the string library should not crash. $ g++ -Wall test.cc test.cc: In function `std::string Test(int)': test.cc:3: warning: control reaches end of non-void function test.cc: At global scope: test.cc:4: warning: ISO C++ forbids declaration of `main' with no type Should you like, you can also turn on -Werror. Thanks, - Jeremy -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]