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++/17947] New: bad warning with implicit conversion and __attribute__((deprecated))


///////////////////////////
struct Foo
{
    operator int() __attribute__((deprecated));
};

int main()
{
  Foo f;
  (int)f;
}
///////////////////////////

gives: 

warning: `operator 1' is deprecated

In real code the '1' is often a bigger number.

-- 
           Summary: bad warning with implicit conversion and
                    __attribute__((deprecated))
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: joerg dot richter at pdv-fs dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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