public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17947] New: bad warning with implicit conversion and __attribute__((deprecated))
@ 2004-10-12 15:20 joerg dot richter at pdv-fs dot de
  2004-10-12 16:07 ` [Bug c++/17947] " pinskia at gcc dot gnu dot org
  2004-10-12 16:14 ` bangerth at dealii dot org
  0 siblings, 2 replies; 3+ messages in thread
From: joerg dot richter at pdv-fs dot de @ 2004-10-12 15:20 UTC (permalink / raw)
  To: gcc-bugs

///////////////////////////
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/17947] bad warning with implicit conversion and __attribute__((deprecated))
  2004-10-12 15:20 [Bug c++/17947] New: bad warning with implicit conversion and __attribute__((deprecated)) joerg dot richter at pdv-fs dot de
@ 2004-10-12 16:07 ` pinskia at gcc dot gnu dot org
  2004-10-12 16:14 ` bangerth at dealii dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 16:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-12 16:07 -------
Confirmed, I thought I saw a bug like this before.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-12 16:07:41
               date|                            |


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/17947] bad warning with implicit conversion and __attribute__((deprecated))
  2004-10-12 15:20 [Bug c++/17947] New: bad warning with implicit conversion and __attribute__((deprecated)) joerg dot richter at pdv-fs dot de
  2004-10-12 16:07 ` [Bug c++/17947] " pinskia at gcc dot gnu dot org
@ 2004-10-12 16:14 ` bangerth at dealii dot org
  1 sibling, 0 replies; 3+ messages in thread
From: bangerth at dealii dot org @ 2004-10-12 16:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-10-12 16:14 -------
Yes, me too. What a funny message :-) 
 
BTW, this is how the bug evolved over time: 
 
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:9: warning: 'operator 1' is deprecated (declared at x.cc:3) 
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:9: warning: `operator 1' is deprecated (declared at x.cc:3) 
g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:9: warning: `operator 1' is deprecated (declared at x.cc:3) 
g/x> /home/bangerth/bin/gcc-3.2*/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:9: warning: `operator i' is deprecated (declared at x.cc:3) 
g/x> /home/bangerth/bin/gcc-2*/bin/c++ -c x.cc 
x.cc:3: warning: `deprecated' attribute directive ignored 
 
I.e., something changed between 3.2 and 3.3, but it didn't become better 
or worse. 
 
W. 

-- 


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-12 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12 15:20 [Bug c++/17947] New: bad warning with implicit conversion and __attribute__((deprecated)) joerg dot richter at pdv-fs dot de
2004-10-12 16:07 ` [Bug c++/17947] " pinskia at gcc dot gnu dot org
2004-10-12 16:14 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).