Bug#336406: g++-4.0: problem when string function fails to return string
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
Reply to: