public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts
@ 2004-02-01 10:36 v dot haisman at sh dot cvut dot cz
  2004-02-01 10:38 ` [Bug c++/13957] " v dot haisman at sh dot cvut dot cz
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: v dot haisman at sh dot cvut dot cz @ 2004-02-01 10:36 UTC (permalink / raw)
  To: gcc-bugs

I get this error for attached source. The line that the error message mentions
seems to be correct to my best knowledge. GCC 3.3.1 accepts the code. This code
is one of exemples of functional programming library for C++.
http://www.cc.gatech.edu/~yannis/fc++/download.html

wilx@logout:::~/tmp/fc++/FC++-clients.1.5> g++ -save-temps -I ../FC++.1.5 -o
isort isort.cc
../FC++.1.5/list.h: In member function `fcpp::impl::OddList<T>
fcpp::impl::ConsHelp<T, F, fcpp::impl::List<T> >::operator()(const T&, const F&)
const [with T = int, F = fcpp::Full0<fcpp::impl::binder1and2of2<Insert, int,
fcpp::impl::List<int> > >]':
../FC++.1.5/list.h:592:   instantiated from `fcpp::impl::OddList<T>
fcpp::impl::XCons::operator()(const T&, const F&) const [with T = int, F =
fcpp::Full0<fcpp::impl::binder1and2of2<Insert, int, fcpp::impl::List<int> > >]'
../FC++.1.5/curry.h:188:   instantiated from `static R
fcpp::impl::Curryable2Helper<R, F, X, Y>::go(const F&, const X&, const Y&) [with
R = fcpp::impl::OddList<int>, F = fcpp::impl::XCons, X = int, Y =
fcpp::Full0<fcpp::impl::binder1and2of2<Insert, int, fcpp::impl::List<int> > >]'
../FC++.1.5/full.h:115:   instantiated from `typename fcpp::Full2<F>::Sig<X,
Y>::ResultType fcpp::Full2<F>::operator()(const X&, const Y&) const [with X =
int, Y = fcpp::Full0<fcpp::impl::binder1and2of2<Insert, int,
fcpp::impl::List<int> > >, F = fcpp::impl::XCons]'
isort.cc:15:   instantiated from here
../FC++.1.5/list.h:564: error: `fcpp::impl::Cache<T>::CvtFxn' names a type, but
a non-type is expected

-- 
           Summary: GCC 3.4 rejects some template heavy code that 3.3.1
                    accepts
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: v dot haisman at sh dot cvut dot cz
                CC: gcc-bugs at gcc dot gnu dot org,v dot haisman at sh dot
                    cvut dot cz
 GCC build triplet: i386-unknown-freebsd4.9
  GCC host triplet: i386-unknown-freebsd4.9
GCC target triplet: i386-unknown-freebsd4.9


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
@ 2004-02-01 10:38 ` v dot haisman at sh dot cvut dot cz
  2004-02-01 10:48 ` v dot haisman at sh dot cvut dot cz
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: v dot haisman at sh dot cvut dot cz @ 2004-02-01 10:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From v dot haisman at sh dot cvut dot cz  2004-02-01 10:38 -------
Created an attachment (id=5637)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5637&action=view)
preprocessed source


-- 


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
  2004-02-01 10:38 ` [Bug c++/13957] " v dot haisman at sh dot cvut dot cz
@ 2004-02-01 10:48 ` v dot haisman at sh dot cvut dot cz
  2004-02-01 11:31 ` giovannibajo at libero dot it
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: v dot haisman at sh dot cvut dot cz @ 2004-02-01 10:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From v dot haisman at sh dot cvut dot cz  2004-02-01 10:48 -------
Forgot to add GCC's specs:
Reading specs from /home/4/wilx/lib/gcc/i386-unknown-freebsd4.9/3.4.0/specs
Configured with: ../srcdir/configure --disable-nls
--enable-version-specific-runtime-libs --enable-dwarf2 --with-cpu=i686
--with-arch=i686 --with-system-zlib --disable-shared --prefix=/home/4/wilx
--enable-languages=c,c++ --disable-sjlj-exceptions --enable-shared=libstdc++
Thread model: posix
gcc version 3.4.0 20040129 (prerelease)



-- 


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
  2004-02-01 10:38 ` [Bug c++/13957] " v dot haisman at sh dot cvut dot cz
  2004-02-01 10:48 ` v dot haisman at sh dot cvut dot cz
@ 2004-02-01 11:31 ` giovannibajo at libero dot it
  2004-02-01 18:13 ` giovannibajo at libero dot it
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-01 11:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-01 11:31 -------
Not a bug, the library code is ill-formed. list.h around line 562 should be:

template <class T, class F> struct ConsHelp<T,F,List<T> > {
   OddList<T> operator()( const T& x, const F& f ) const {
      return OddList<T>(x, List<T>(
         IRef<Cache<T> >(new Cache<T>(typename Cache<T>::CvtFxn(),f))));
   }
 
Note the keyword "typename" I added.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (2 preceding siblings ...)
  2004-02-01 11:31 ` giovannibajo at libero dot it
@ 2004-02-01 18:13 ` giovannibajo at libero dot it
  2004-02-01 18:13 ` giovannibajo at libero dot it
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-01 18:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |diagnostic


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (3 preceding siblings ...)
  2004-02-01 18:13 ` giovannibajo at libero dot it
@ 2004-02-01 18:13 ` giovannibajo at libero dot it
  2004-02-01 18:13 ` giovannibajo at libero dot it
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-01 18:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-01 18:13 -------
Reopen the bug to keep it as an enhancement request for improved error message.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (4 preceding siblings ...)
  2004-02-01 18:13 ` giovannibajo at libero dot it
@ 2004-02-01 18:13 ` giovannibajo at libero dot it
  2004-02-02  0:02 ` giovannibajo at libero dot it
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-01 18:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-01 18:13 -------
I have a patch in testing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |giovannibajo at libero dot
                   |dot org                     |it
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-01 18:13:30
               date|                            |


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (5 preceding siblings ...)
  2004-02-01 18:13 ` giovannibajo at libero dot it
@ 2004-02-02  0:02 ` giovannibajo at libero dot it
  2004-02-02  1:09 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-02  0:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-02 00:02 -------
Patch here:
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00037.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (6 preceding siblings ...)
  2004-02-02  0:02 ` giovannibajo at libero dot it
@ 2004-02-02  1:09 ` cvs-commit at gcc dot gnu dot org
  2004-02-02  1:11 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-02  1:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-02 01:09 -------
Subject: Bug 13957

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	giovannibajo@gcc.gnu.org	2004-02-02 01:09:25

Modified files:
	gcc/cp         : ChangeLog 

Log message:
	PR c++/13957
	* pt.c (tsubst_qualified_id): Improved error message when a type
	is expected but	not found.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3923&r2=1.3924



-- 


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


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

* [Bug c++/13957] GCC 3.4 rejects some template heavy code that 3.3.1 accepts
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (7 preceding siblings ...)
  2004-02-02  1:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-02  1:11 ` cvs-commit at gcc dot gnu dot org
  2004-02-02 15:43 ` [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-02  1:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-02 01:11 -------
Subject: Bug 13957

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	giovannibajo@gcc.gnu.org	2004-02-02 01:11:03

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: qualified-id1.C 
	                               non-type-template-argument-1.C 
Added files:
	gcc/testsuite/g++.dg/template: nontype6.C 

Log message:
	PR c++/13957
	* g++.dg/template/non-type-template-argument-1.C,
	g++.dg/template/qualified-id1.C: Update	dg-error marks.
	* g++.dg/template/nontype6.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3448&r2=1.3449
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/qualified-id1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-type-template-argument-1.C.diff?cvsroot=gcc&r1=1.2&r2=1.3



-- 


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


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

* [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (8 preceding siblings ...)
  2004-02-02  1:11 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-02 15:43 ` cvs-commit at gcc dot gnu dot org
  2004-02-02 15:47 ` cvs-commit at gcc dot gnu dot org
  2004-02-02 15:51 ` giovannibajo at libero dot it
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-02 15:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-02 15:43 -------
Subject: Bug 13957

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	giovannibajo@gcc.gnu.org	2004-02-02 15:42:58

Modified files:
	gcc/cp         : ChangeLog pt.c 

Log message:
	PR c++/13957
	* pt.c (tsubst_qualified_id): Improved error message when a type
	is expected but	not found.

Patches:
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.25&r2=1.3892.2.26
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.5&r2=1.816.2.6



-- 


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


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

* [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (9 preceding siblings ...)
  2004-02-02 15:43 ` [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type cvs-commit at gcc dot gnu dot org
@ 2004-02-02 15:47 ` cvs-commit at gcc dot gnu dot org
  2004-02-02 15:51 ` giovannibajo at libero dot it
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-02 15:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-02 15:47 -------
Subject: Bug 13957

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	giovannibajo@gcc.gnu.org	2004-02-02 15:47:25

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: qualified-id1.C 
	                               non-type-template-argument-1.C 
Added files:
	gcc/testsuite/g++.dg/template: nontype6.C 

Log message:
	PR c++/13957
	* g++.dg/template/non-type-template-argument-1.C,
	g++.dg/template/qualified-id1.C: Update dg-error marks.
	* g++.dg/template/nontype6.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.37&r2=1.3389.2.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype6.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/testsuite/g++.dg/template/qualified-id1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.22.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/non-type-template-argument-1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.12.1



-- 


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


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

* [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type
  2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
                   ` (10 preceding siblings ...)
  2004-02-02 15:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-02 15:51 ` giovannibajo at libero dot it
  11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-02 15:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-02 15:51 -------
Fixed in 3.4.0. Now the error message for the testcase is (apart from the 
instantiation context:

list.h:564: error: dependent-name `fcpp::impl::Cache<T>::CvtFxn' is parsed as a 
non-type, but instantiation yields a type
list.h:564: note: say `typename fcpp::impl::Cache<T>::CvtFxn' if a type is meant

Hope this is more clear. Thank you for your report!


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


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


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

end of thread, other threads:[~2004-02-02 15:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-01 10:36 [Bug c++/13957] New: GCC 3.4 rejects some template heavy code that 3.3.1 accepts v dot haisman at sh dot cvut dot cz
2004-02-01 10:38 ` [Bug c++/13957] " v dot haisman at sh dot cvut dot cz
2004-02-01 10:48 ` v dot haisman at sh dot cvut dot cz
2004-02-01 11:31 ` giovannibajo at libero dot it
2004-02-01 18:13 ` giovannibajo at libero dot it
2004-02-01 18:13 ` giovannibajo at libero dot it
2004-02-01 18:13 ` giovannibajo at libero dot it
2004-02-02  0:02 ` giovannibajo at libero dot it
2004-02-02  1:09 ` cvs-commit at gcc dot gnu dot org
2004-02-02  1:11 ` cvs-commit at gcc dot gnu dot org
2004-02-02 15:43 ` [Bug c++/13957] Insufficient diagnostic for dependent expression parsed as non-type but instantiated as type cvs-commit at gcc dot gnu dot org
2004-02-02 15:47 ` cvs-commit at gcc dot gnu dot org
2004-02-02 15:51 ` giovannibajo at libero dot it

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