public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17327] New: use of `enumeral_type' in template type unification
@ 2004-09-05 12:50 hansen-lars at t-online dot de
2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hansen-lars at t-online dot de @ 2004-09-05 12:50 UTC (permalink / raw)
To: gcc-bugs
Version:
--------
http://mesh.dl.sourceforge.net/sourceforge/mingw/gcc-core-3.4.1-20040711-
1.tar.gz
Using built-in specs.
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
ation --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.1 (mingw special)
Compiler settings:
------------------
g++.exe "F:\Daten\Projekte\CPP\trainingGNU\templates.cpp" -
o "F:\Daten\Projekte\CPP\trainingGNU\templates.exe" -I"C:\Dev-
Cpp\include\c++\3.4.1" -I"C:\Dev-Cpp\include\c++\3.4.1\mingw32" -I"C:\Dev-
Cpp\include\c++\3.4.1\backward" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.1\include" -
I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
Messages:
---------
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp: In instantiation of `A<E>':
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:47: instantiated from here
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use
of `enumeral_type' in template type unification
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use
of `enumeral_type' in template type unification
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use
of `enumeral_type' in template type unification
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use
of `enumeral_type' in template type unification
F:\Daten\Projekte\CPP\trainingGNU\templates.cpp:24: sorry, unimplemented: use
of `enumeral_type' in template type unification
Problem:
--------
The code can be compiled successfully with other compilers like Comeau or
Borland BuilderX and runs proper.
Source:
-------
#include <iostream>
#include <cstdlib>
using namespace std;
//////////////////////////////////////////////////////////////////////
enum E
{
E0,
E1
};
//////////////////////////////////////////////////////////////////////
template <typename T>
class A;
template <typename T>
ostream& operator << (ostream& out, A<T> a);
template <typename T>
class A
{
friend ostream& operator << <T> (ostream& out, A<T> a);
int mI;
public:
A(int i) { mI = i; }
};
template <typename T>
ostream& operator << (ostream& out, A<T> a)
{
out << a.mI;
return out;
}
//////////////////////////////////////////////////////////////////////
int main()
{
A<int> a = 5;
cout << a << endl;
A<E> b = 4;
cout << b << endl;
system("Pause");
return 0;
}
--
Summary: use of `enumeral_type' in template type unification
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hansen-lars at t-online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/3.5 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
@ 2004-09-06 14:27 ` lerdsuwa at gcc dot gnu dot org
2004-09-06 14:28 ` lerdsuwa at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-09-06 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-09-06 14:27 -------
Confirmed. It has failed since GCC 3.0 - a regression to GCC 2.95.x.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |3.0.4 3.2.3 3.3.3 3.4.1
| |3.5.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2004-09-06 14:27:22
date| |
Summary|use of `enumeral_type' in |[3.3/3.4/3.5 Regression] use
|template type unification |of `enumeral_type' in
| |template type unification
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/3.5 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
@ 2004-09-06 14:28 ` lerdsuwa at gcc dot gnu dot org
2004-09-06 14:41 ` giovannibajo at libero dot it
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-09-06 14:28 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/3.5 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
2004-09-06 14:28 ` lerdsuwa at gcc dot gnu dot org
@ 2004-09-06 14:41 ` giovannibajo at libero dot it
2004-09-06 17:16 ` lerdsuwa at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-06 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-09-06 14:41 -------
A reduced testcase is needed to analyze the bug, because it definetely has to
do with some other operator<< for ostreams defined in the standard headers. Can
anybody help?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/3.5 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
` (2 preceding siblings ...)
2004-09-06 14:41 ` giovannibajo at libero dot it
@ 2004-09-06 17:16 ` lerdsuwa at gcc dot gnu dot org
2004-09-09 4:30 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-09-06 17:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-09-06 17:16 -------
A simple testcase:
enum E { E0, E1 };
template <class T,class U> class A {};
template <class T> void f(A<E,T>) {}
template void f(A<int,E>);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/3.5 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
` (3 preceding siblings ...)
2004-09-06 17:16 ` lerdsuwa at gcc dot gnu dot org
@ 2004-09-09 4:30 ` mmitchel at gcc dot gnu dot org
2004-09-14 0:29 ` [Bug c++/17327] [3.3/3.4/4.0 " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-09-09 4:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-09-09 04:30 -------
Mine.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/4.0 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
` (4 preceding siblings ...)
2004-09-09 4:30 ` mmitchel at gcc dot gnu dot org
@ 2004-09-14 0:29 ` cvs-commit at gcc dot gnu dot org
2004-09-14 0:44 ` mmitchel at gcc dot gnu dot org
2004-09-14 0:44 ` cvs-commit at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-14 0:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-14 00:29 -------
Subject: Bug 17327
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-09-14 00:29:04
Modified files:
gcc/testsuite : ChangeLog
gcc/cp : ChangeLog parser.c pt.c
Added files:
gcc/testsuite/g++.dg/parse: crash17.C
gcc/testsuite/g++.dg/template: enum3.C
Log message:
PR c++/16716
* parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
Robustify.
PR c++/17327
* pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
gcc_unreacable.
PR c++/16716
* g++.dg/parse/crash17.C: New test.
PR c++/17327
* g++.dg/template/enum3.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4279&r2=1.4280
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4348&r2=1.4349
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.245&r2=1.246
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.921&r2=1.922
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash17.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/enum3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/4.0 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
` (5 preceding siblings ...)
2004-09-14 0:29 ` [Bug c++/17327] [3.3/3.4/4.0 " cvs-commit at gcc dot gnu dot org
@ 2004-09-14 0:44 ` mmitchel at gcc dot gnu dot org
2004-09-14 0:44 ` cvs-commit at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-09-14 0:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-09-14 00:44 -------
Fixed in GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|3.0.4 3.2.3 3.3.3 3.4.1 4.0 |3.0.4 3.2.3 3.3.3 3.4.1
| |4.0.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/17327] [3.3/3.4/4.0 Regression] use of `enumeral_type' in template type unification
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
` (6 preceding siblings ...)
2004-09-14 0:44 ` mmitchel at gcc dot gnu dot org
@ 2004-09-14 0:44 ` cvs-commit at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-14 0:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-14 00:44 -------
Subject: Bug 17327
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-09-14 00:44:06
Modified files:
gcc/testsuite : ChangeLog
gcc/cp : ChangeLog pt.c
Added files:
gcc/testsuite/g++.dg/template: enum3.C
Log message:
PR c++/17327
* pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
gcc_unreacable.
PR c++/17327
* g++.dg/template/enum3.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.266&r2=1.3389.2.267
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/enum3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.155&r2=1.3892.2.156
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.41&r2=1.816.2.42
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17327
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-09-14 0:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-05 12:50 [Bug c++/17327] New: use of `enumeral_type' in template type unification hansen-lars at t-online dot de
2004-09-06 14:27 ` [Bug c++/17327] [3.3/3.4/3.5 Regression] " lerdsuwa at gcc dot gnu dot org
2004-09-06 14:28 ` lerdsuwa at gcc dot gnu dot org
2004-09-06 14:41 ` giovannibajo at libero dot it
2004-09-06 17:16 ` lerdsuwa at gcc dot gnu dot org
2004-09-09 4:30 ` mmitchel at gcc dot gnu dot org
2004-09-14 0:29 ` [Bug c++/17327] [3.3/3.4/4.0 " cvs-commit at gcc dot gnu dot org
2004-09-14 0:44 ` mmitchel at gcc dot gnu dot org
2004-09-14 0:44 ` cvs-commit 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).