This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/2668: failure to match template member array definition with declaration
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2668: failure to match template member array definition with declaration
- From: Jens dot Maurer at gmx dot net
- Date: 27 Apr 2001 16:51:46 -0000
- Cc: darylew at mac dot com
- Reply-To: Jens dot Maurer at gmx dot net
>Number: 2668
>Category: c++
>Synopsis: failure to match template member array definition with declaration
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Apr 27 09:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Jens Maurer
>Release: gcc version 3.0 20010425 (prerelease)
>Organization:
>Environment:
Linux 2.4.3 on x86, glibc 2.2.2
>Description:
gcc fails to match the (required) definition of the
static member with its declaration.
Also happens (same error) on gcc 2.95.3 and
gcc version 3.1 20010425 (experimental)
template-vector-match.cc:8: conflicting types for `T S<T>::a[256]'
template-vector-match.cc:4: previous declaration as `T S<T>::a[(1 << 8)]'
>How-To-Repeat:
template<class T>
struct S {
static T a[1 << 8];
};
template<class T>
T S<T>::a[1 << 8];
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: