This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
980608 value returning inlines not checked
- To: egcs-bugs at cygnus dot com
- Subject: 980608 value returning inlines not checked
- From: dcb at pncl dot co dot uk (David C Binderman)
- Date: Wed, 10 Jun 1998 20:58:46 +0100 (BST)
Hello there,
For the following source code, compiled by egcs-980608 on
Linux/i586
int i = 1;
inline double
f1()
{
i = 2;
// note no return stmt.
}
struct A {};
inline A
f2()
{
i = 3;
// note no return stmt.
}
struct B {
int foo() {
i = 4;
// note no return stmt.
}
};
struct C {
C foo() {
i = 5;
// note no return stmt.
}
};
struct D {
inline D foo();
};
inline D
D::foo()
{
i = 6;
// note no return stmt.
}
int
main()
{
f1();
f2();
B b;
b.foo();
C c;
c.foo();
D d;
d.foo();
return 0;
}
I got *no* errors at compile time. Other compiler happily spot the many
problems in the
code.
Regards
David Binderman MSc BSc +44 1293 534 847 dcb_AVOID_JUNK_MAIL@pncl.co.uk
There is no substitute for skill, taste and experience when programming
- Dr Stroustrup, inventor of C++