This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12591] gcc accepts invalid code


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12591



------- Additional Comments From hg211 at ural2 dot hszk dot bme dot hu  2003-10-13 13:53 -------
Not really. The code is still invalid (it doesn't matter whether the function
call eliminated or not). Consider this:

class foo {
	public:
		foo(foo &);
		foo();
};

const foo &bar = foo();

Here, the compiler had to eliminate a function call to a function which doesn't
exist. So Compaq's compiler is wrong too: it's not a warning, but an error.
Although it's not a serious error :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]