public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11763] New: [tree-ssa] members disappear when inherited from template parameter class
@ 2003-08-01 16:15 stefaandr at hotmail dot com
  2003-08-01 16:29 ` [Bug c++/11763] " pinskia at physics dot uc dot edu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: stefaandr at hotmail dot com @ 2003-08-01 16:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [tree-ssa] members disappear when inherited from
                    template parameter class
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefaandr at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

This code compiles on 3.3 but not on tree-ssa:

template <class T> struct b : public T { b() { aa = 5; }; };
struct a { int aa; };
b < a > test;

Reading specs from /esat/quendi/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.5-tree-ssa/specs
Configured with: ../gcc/configure --prefix=/esat/quendi/gcc --enable-languages=c,c++
Thread model: posix
gcc version 3.5-tree-ssa 20030731 (merged 20030722)
 /esat/quendi/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.5-tree-ssa/cc1plus -quiet -v
-D_GNU_SOURCE t6.cpp -quiet -dumpbase t6.cpp -mtune=pentiumpro -auxbase-strip t6
-version -o /tmp/ccgUUkol.s
ignoring nonexistent directory "/esat/quendi/gcc/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /esat/quendi/gcc/include/c++/3.5-tree-ssa
 /esat/quendi/gcc/include/c++/3.5-tree-ssa/i686-pc-linux-gnu
 /esat/quendi/gcc/include/c++/3.5-tree-ssa/backward
 /usr/local/include
 /esat/quendi/gcc/include
 /esat/quendi/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.5-tree-ssa/include
 /usr/include
End of search list.
GNU C++ version 3.5-tree-ssa 20030731 (merged 20030722) (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48056
t6.cpp: In constructor `b<T>::b()':
t6.cpp:2: error: `aa' undeclared (first use this function)
t6.cpp:2: error: (Each undeclared identifier is reported only once for each
   function it appears in.)


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

* [Bug c++/11763] members disappear when inherited from template parameter class
  2003-08-01 16:15 [Bug c++/11763] New: [tree-ssa] members disappear when inherited from template parameter class stefaandr at hotmail dot com
@ 2003-08-01 16:29 ` pinskia at physics dot uc dot edu
  2003-08-04 10:25 ` stefaandr at hotmail dot com
  2003-08-04 10:53 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-01 16:29 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|[tree-ssa] members disappear|members disappear when
                   |when inherited from template|inherited from template
                   |parameter class             |parameter class
            Version|tree-ssa                    |3.4


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-01 16:29 -------
This is not a bug as gcc is more strict on implementing the C++ standard.
Read <http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html#Name%20lookup>.
Also since the tree-ssa branch gets merged from the mainline every once in a while, you should try 
the mainline also.
This is not dependent on the tree-ssa so removing the markers.


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

* [Bug c++/11763] members disappear when inherited from template parameter class
  2003-08-01 16:15 [Bug c++/11763] New: [tree-ssa] members disappear when inherited from template parameter class stefaandr at hotmail dot com
  2003-08-01 16:29 ` [Bug c++/11763] " pinskia at physics dot uc dot edu
@ 2003-08-04 10:25 ` stefaandr at hotmail dot com
  2003-08-04 10:53 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: stefaandr at hotmail dot com @ 2003-08-04 10:25 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From stefaandr at hotmail dot com  2003-08-04 10:25 -------
Subject: Re:  members disappear when inherited from template
 parameter class

This question is likely a very stupid one, but here goes:
I compiled:

template <class T> class a : public T { public: using T::aa; a() { aa = 5; 
}; };class b { protected: int aa; };
a < b > a1;

with
  GNU C++ version 3.4 20030803 (experimental) (i686-pc-linux-gnu)
    which worked
  GNU C++ version 3.5-tree-ssa 20030731 (merged 20030722) (i686-pc-linux-gnu)
    which gives:
p.cpp: In constructor `a<T>::a()':
p.cpp:1: error: `aa' undeclared (first use this function)
p.cpp:1: error: (Each undeclared identifier is reported only once for each
   function it appears in.)
Am I using the wrong cvs-branch (3.4) to test against?  Or am I doing 
still something else wrong?

Thanks,
Stefaan


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

* [Bug c++/11763] members disappear when inherited from template parameter class
  2003-08-01 16:15 [Bug c++/11763] New: [tree-ssa] members disappear when inherited from template parameter class stefaandr at hotmail dot com
  2003-08-01 16:29 ` [Bug c++/11763] " pinskia at physics dot uc dot edu
  2003-08-04 10:25 ` stefaandr at hotmail dot com
@ 2003-08-04 10:53 ` pinskia at physics dot uc dot edu
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04 10:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-04 10:53 -------
As I said before the tree-ssa branch gets merged from the mainline.  The problem on the mainline 
was just fixed in the last week so the only way for the tree-ssa to be fixed is to have them merge 
again. (The last merge is in the version, merged 20030722.)


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

end of thread, other threads:[~2003-08-04 10:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 16:15 [Bug c++/11763] New: [tree-ssa] members disappear when inherited from template parameter class stefaandr at hotmail dot com
2003-08-01 16:29 ` [Bug c++/11763] " pinskia at physics dot uc dot edu
2003-08-04 10:25 ` stefaandr at hotmail dot com
2003-08-04 10:53 ` pinskia at physics dot uc dot edu

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).