[Bug 10915] New: a not-useful non-avoidable warning: conversion to a reference to the same type will never use a type conversion operator
gcc-bugzilla@gcc.gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 21 20:34: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=10915
Summary: a not-useful non-avoidable warning: conversion to a
reference to the same type will never use a type
conversion operator
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: serge.bogdanov@intel.com
CC: gcc-bugs@gcc.gnu.org
Warning: "conversion to a reference to the same type will never use a type
conversion operator" is generated in decl.c:12578.
It would be nice to be able to turn the warning off or get rid of it, because it
does not provide any useful info.
This warning is produced in the following example (that shows a possible usage
for the conversion operator):
#include <iostream>
struct X;
struct A {
virtual operator X&();
};
struct X : public A {
operator X&() {
return *this;
}
};
A::operator X&() {
static X x;
std::cerr << "Error" << std::endl;
return x;
}
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Gcc-bugs
mailing list