public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4629: non-constant `sizeof (void*)' cannot be used as template argument
@ 2001-11-15  0:48 mmitchel
  0 siblings, 0 replies; 4+ messages in thread
From: mmitchel @ 2001-11-15  0:48 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4629; it has been noted by GNATS.

From: mmitchel@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  nobody@gcc.gnu.org, schmid@snake.iap.physik.tu-darmstadt.de
Cc:  
Subject: Re: c++/4629: non-constant `sizeof (void*)' cannot be used as template argument
Date: 20 Nov 2001 04:48:06 -0000

 Synopsis: non-constant `sizeof (void*)' cannot be used as template argument
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: mmitchel
 State-Changed-When: Mon Nov 19 20:48:05 2001
 State-Changed-Why:
     Fixed.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4629&database=gcc


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

* Re: c++/4629: non-constant `sizeof (void*)' cannot be used as template argument
@ 2001-11-14 16:16 mmitchel
  0 siblings, 0 replies; 4+ messages in thread
From: mmitchel @ 2001-11-14 16:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, nobody, schmid

Synopsis: non-constant `sizeof (void*)' cannot be used as template argument

State-Changed-From-To: analyzed->closed
State-Changed-By: mmitchel
State-Changed-When: Mon Nov 19 20:48:05 2001
State-Changed-Why:
    Fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4629&database=gcc


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

* Re: c++/4629: non-constant `sizeof (void*)' cannot be used as template argument
@ 2001-10-23  2:40 lerdsuwa
  0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2001-10-23  2:40 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, schmid

Synopsis: non-constant `sizeof (void*)' cannot be used as template argument

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Tue Oct 23 02:40:10 2001
State-Changed-Why:
    Confirm as a bug.  A regression from gcc 3.0.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4629&database=gcc


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

* c++/4629: non-constant `sizeof (void*)' cannot be used as template argument
@ 2001-10-20  7:26 Peter Schmid
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Schmid @ 2001-10-20  7:26 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4629
>Category:       c++
>Synopsis:       non-constant `sizeof (void*)' cannot be used as template argument
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 20 07:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        3.1 20011013 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.12 #2 Sat Oct 20 15:07:23 CEST 2001 i686 unknown
Architecture: i686
SuSE 7.1
glibc 2.2
GNU ld version 2.11.90.0.23
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
>Description:
gcc 3.1 rejects the following code tp.C extracted from
libs/pool/test/test_pool_alloc.cpp from the current boost
repository. gcc 3.01 and gcc 2.95.2 accept this code.

>How-To-Repeat:

Source code tp.C
template <unsigned I> struct A {};

template <typename SizeType>
struct B
{
    char * f() const
    {
      return (A<sizeof(void *)>::value);
    }
};

Compiling tp.C by gcc 3.1
g++ -v -c -W -Wall tp.C 
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.1 20011013 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tp.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tp.C -W -Wall -version -o /tmp/ccEyvLMb.s
GNU CPP version 3.1 20011013 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011013 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20011013 (experimental).
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.
tp.C: In member function `char* B<SizeType>::f() const':
tp.C:8: non-constant `sizeof (void*)' cannot be used as template argument

Compiling tp.C by gcc 2.95.2
/usr/bin/g++ -v -c -W -Wall tp.C 
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -W -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ tp.C /tmp/ccwTynxn.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/../../../../i486-suse-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cc1plus /tmp/ccwTynxn.ii -quiet -dumpbase tp.cc -W -Wall -version -o /tmp/ccWkj1hG.s
GNU C++ version 2.95.2 19991024 (release) (i486-suse-linux) compiled by GNU C version 2.95.2 19991024 (release).
 /usr/i486-suse-linux/bin/as -V -Qy -o tp.o /tmp/ccWkj1hG.s
GNU assembler version 2.10.91 (i486-suse-linux) using BFD version 2.10.0.33

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-11-20  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-15  0:48 c++/4629: non-constant `sizeof (void*)' cannot be used as template argument mmitchel
  -- strict thread matches above, loose matches on Subject: below --
2001-11-14 16:16 mmitchel
2001-10-23  2:40 lerdsuwa
2001-10-20  7:26 Peter Schmid

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