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]

Re: annoying warning message


> the following program produces a warning message though
> I believe it is well formed.

Yes, the program is well-formed.

> Who is right ?

Hard to say, without knowing the intentions of the omniORB authors.
g++ selects (correctly) the operator returning a Vertex&; not the
one returning a Vertex const&. It then qualification-converts that
to Vertext const&.

If that's what you want to happen, both your program and gcc are
right, and the warning is just annoying.

However, if you wanted that to call the operator returning Vertex
const&, you are wrong - thankfully, gcc warned you :-)

If you understand all of that well, and just want to get rid of the
warning, you'd have to change the compiler not to produce it. In the
mainline, this is changed as well.

Hope this helps,
Martin


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