strange warning 'control reaches end of non-void function'
Peter Kelb
peter.kelb@mchp.siemens.de
Fri Mar 10 01:39:00 GMT 2000
Hi,
I get a strange warning in the following case:
gcc version: 2.95.1
system type:ÃÂ PC pentium III, Linux Suse 6.2
gcc call:ÃÂ g++ÃÂ -O -Wall t1.C
Can you help. Regards, Peter Kelb
--ÃÂ
Dr. Peter KelbÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ phone:ÃÂ ÃÂ (+49) 89 636 45890
Siemens AG, ZT SE 4ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ fax:ÃÂ ÃÂ ÃÂ ÃÂ (+49) 89 636 42284
Otto-Hahn-Ring 6ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ e-mail:ÃÂ Peter.Kelb@mchp.siemens.de
D-81739 Muenchen, Germany
-------------------------------------------------------------------
"As an adolescent I aspired to lasting fame, I craved factual
certainty, and I thirsted for a meaningful vision of human life
-- so I became a scientist.ÃÂ This is like becoming an archbishop
so you can meet girls."
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ -- Matt Cartmill
ÃÂ
#include <vector>
#include <iostream>
struct A {
A() {cout << "juhu\n";}
int m_i;
};
A* create() {
vector<A> arNewArgs;
return new A();
}
int
main() {
A* pA = 0;
pA = create();
cout << pA << "\n";
}
More information about the Gcc-bugs
mailing list