public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39560]  New: Erroneous wanings 'unused variable' in a templetated class method with union
@ 2009-03-26  4:43 yuri at tsoft dot com
  2009-04-16 21:05 ` [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: yuri at tsoft dot com @ 2009-03-26  4:43 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

This testcase has warnings:
--- begin testcase ---
struct X { };

class Z {
public:
  X* cc(int c);
};

class F {
public:
  typedef X* (Z::*MethO)(int);
  typedef X* (F::*MethF)(int);
  template<MethO m>
  X* xwrapper(int i) {
    union {
      Z *z;
      F *f;
    };
    f = this;
    return ((z->*m)(i));
  }
};

F::MethF meth = &F::xwrapper<&Z::cc>;
--- end testcase ---
warnings:
c.C: In member function ‘X* F::xwrapper(int) [with X* (Z::* m)(int) = &Z::cc]’:
c.C:23:   instantiated from here
c.C:17: warning: unused variable ‘z’
c.C:17: warning: unused variable ‘f’


-- 
           Summary: Erroneous wanings 'unused variable' in a templetated
                    class method with union
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
@ 2009-04-16 21:05 ` pinskia at gcc dot gnu dot org
  2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-16 21:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-04-16 21:05 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|                            |4.0.1
   Last reconfirmed|0000-00-00 00:00:00         |2009-04-16 21:05:19
               date|                            |
            Summary|Erroneous warnings 'unused  |[4.3/4.4/4.5 Regression]
                   |variable' in a templated    |Erroneous warnings 'unused
                   |class method with union     |variable' in a templated
                   |                            |class method with union
   Target Milestone|---                         |4.3.4


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
  2009-04-16 21:05 ` [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated " pinskia at gcc dot gnu dot org
@ 2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
  2009-08-04 12:48 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 13:30 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
  2009-04-16 21:05 ` [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated " pinskia at gcc dot gnu dot org
  2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
@ 2009-08-04 12:48 ` rguenth at gcc dot gnu dot org
  2009-11-12 23:02 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-08-04 12:30 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
                   ` (2 preceding siblings ...)
  2009-08-04 12:48 ` rguenth at gcc dot gnu dot org
@ 2009-11-12 23:02 ` jason at gcc dot gnu dot org
  2009-11-12 23:22 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:02 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-04-16 21:05:19         |2009-11-12 23:01:43
               date|                            |


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
                   ` (3 preceding siblings ...)
  2009-11-12 23:02 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:22 ` jason at gcc dot gnu dot org
  2009-11-12 23:26 ` jason at gcc dot gnu dot org
  2009-11-12 23:27 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2009-11-12 23:21 -------
Subject: Bug 39560

Author: jason
Date: Thu Nov 12 23:21:33 2009
New Revision: 154133

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154133
Log:
        PR c++/39560
        * decl2.c (build_anon_union_vars): Set DECL_ARTIFICIAL.

Added:
    trunk/gcc/testsuite/g++.dg/lookup/anon7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl2.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
                   ` (4 preceding siblings ...)
  2009-11-12 23:22 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:26 ` jason at gcc dot gnu dot org
  2009-11-12 23:27 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-11-12 23:26 -------
Fixed for 4.5.  Let me know if you'd like it applied to a release branch as
well.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated class method with union
  2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
                   ` (5 preceding siblings ...)
  2009-11-12 23:26 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:27 ` jason at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2009-11-12 23:27 -------
Fixed for 4.5.  Let me know if you'd like it applied to a release branch as
well.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.5                       |4.5.0


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


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

end of thread, other threads:[~2009-11-12 23:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26  4:43 [Bug c++/39560] New: Erroneous wanings 'unused variable' in a templetated class method with union yuri at tsoft dot com
2009-04-16 21:05 ` [Bug c++/39560] [4.3/4.4/4.5 Regression] Erroneous warnings 'unused variable' in a templated " pinskia at gcc dot gnu dot org
2009-04-22 13:30 ` rguenth at gcc dot gnu dot org
2009-08-04 12:48 ` rguenth at gcc dot gnu dot org
2009-11-12 23:02 ` jason at gcc dot gnu dot org
2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:26 ` jason at gcc dot gnu dot org
2009-11-12 23:27 ` jason at gcc dot gnu 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).