[Bug c++/11435] New: Incorrect main signatures fails to generate diagnostic, program fails
Michiel dot Salters at logicacmg dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 4 17:03:00 GMT 2003
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;
}
More information about the Gcc-bugs
mailing list