public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/15801] New: g++ fails to identify member variables in templates @ 2004-06-03 19:12 gcc-bugzilla at gcc dot gnu dot org 2004-06-03 19:15 ` [Bug c++/15801] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: gcc-bugzilla at gcc dot gnu dot org @ 2004-06-03 19:12 UTC (permalink / raw) To: gcc-bugs g++ produces bad error for member variables. See how-to-repeat. This error is triggered in kde 3.3 / kdeaddons. Environment: System: Linux hell.hell.gr 2.6.6 #35 Sat May 29 20:08:29 EEST 2004 i686 unknown unknown GNU/Linux Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.4.0/configure --enable-threads=posix --prefix=/usr --enable-languages=c,c++ --enable-shared --with-arch=pentium3 --with-cpu=pentium3 --enable-__cxa_atexit How-To-Repeat: Using this source: template<class tA> struct A { int var1; } template<class tB> struct B : public A<tB> { void a() { int var2 = var1; } } gives: $ g++ a.c -c -o a.o a.c: In member function `void B<tB>::a()': a.c:10: error: `var1' undeclared (first use this function) a.c:10: error: (Each undeclared identifier is reported only once for each function it appears in.) ------- Additional Comments From v13 at priest dot com 2004-06-03 19:12 ------- Fix: This will make it work as expected: void a() { - int var2 = var1; + int var2 = this->var1; } -- Summary: g++ fails to identify member variables in templates Product: gcc Version: 3.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: v13 at priest 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 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15801] g++ fails to identify member variables in templates 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org @ 2004-06-03 19:15 ` pinskia at gcc dot gnu dot org 2004-06-03 19:25 ` v13 at it dot teithe dot gr ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-03 19:15 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-03 19:15 ------- Not a bug, please read the changes page for a new release before filing a bug. http://gcc.gnu.org/gcc-3.4/changes.html . -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID Version|3.4 |2.95 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15801] g++ fails to identify member variables in templates 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org 2004-06-03 19:15 ` [Bug c++/15801] " pinskia at gcc dot gnu dot org @ 2004-06-03 19:25 ` v13 at it dot teithe dot gr 2004-06-03 19:33 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: v13 at it dot teithe dot gr @ 2004-06-03 19:25 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From v13 at it dot teithe dot gr 2004-06-03 19:25 ------- I don't completely understand this but since it is expected behavior then I'll fill a bug report in kde too... Thanks a lot! p.s. You're *fast*! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15801] g++ fails to identify member variables in templates 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org 2004-06-03 19:15 ` [Bug c++/15801] " pinskia at gcc dot gnu dot org 2004-06-03 19:25 ` v13 at it dot teithe dot gr @ 2004-06-03 19:33 ` pinskia at gcc dot gnu dot org 2004-11-05 19:28 ` bangerth at dealii dot org 2004-11-05 19:32 ` bangerth at dealii dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-06-03 19:33 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-03 19:32 ------- The main idea is get people to reading the release notes so they do not waste their or our time on erroneous bug reports. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15801] g++ fails to identify member variables in templates 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org ` (2 preceding siblings ...) 2004-06-03 19:33 ` pinskia at gcc dot gnu dot org @ 2004-11-05 19:28 ` bangerth at dealii dot org 2004-11-05 19:32 ` bangerth at dealii dot org 4 siblings, 0 replies; 6+ messages in thread From: bangerth at dealii dot org @ 2004-11-05 19:28 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-11-05 19:27 ------- These are all duplicates of PR 15552 -- What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15801] g++ fails to identify member variables in templates 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org ` (3 preceding siblings ...) 2004-11-05 19:28 ` bangerth at dealii dot org @ 2004-11-05 19:32 ` bangerth at dealii dot org 4 siblings, 0 replies; 6+ messages in thread From: bangerth at dealii dot org @ 2004-11-05 19:32 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-11-05 19:31 ------- Duplicate of PR 15552. *** This bug has been marked as a duplicate of 15552 *** -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15801 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-05 19:31 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-06-03 19:12 [Bug c++/15801] New: g++ fails to identify member variables in templates gcc-bugzilla at gcc dot gnu dot org 2004-06-03 19:15 ` [Bug c++/15801] " pinskia at gcc dot gnu dot org 2004-06-03 19:25 ` v13 at it dot teithe dot gr 2004-06-03 19:33 ` pinskia at gcc dot gnu dot org 2004-11-05 19:28 ` bangerth at dealii dot org 2004-11-05 19:32 ` 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).