This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11435] New: Incorrect main signatures fails to generate diagnostic, program fails
- From: "Michiel dot Salters at logicacmg dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2003 17:03:07 -0000
- Subject: [Bug c++/11435] New: Incorrect main signatures fails to generate diagnostic, program fails
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11435
Summary: Incorrect main signatures fails to generate diagnostic,
program fails
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Michiel dot Salters at logicacmg dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.9
GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9
An attempt to replace
int main( int argc, char** argv )
by
int main ( std::string argv )
is not caught at compile time, and subsequent use
of argv causes a Bus Error.
Full program:
#include <string>
#include <iostream>
int main ( std::string argv )
{
std::cout << argv << std::endl;
}