This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13997] New: [3.3?/3.4/3.5 Regression]
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2004 12:12:57 -0000
- Subject: [Bug c++/13997] New: [3.3?/3.4/3.5 Regression]
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Another regression from Boost, this time is the Type Traits library. Minimized
as follows (with the help of John Maddock):
--------------------------------------------
template <typename T>
struct is_array {};
template <typename T, unsigned int N>
struct is_array<T[N]> {};
template <typename T, unsigned int N>
struct is_array<const T[N]> {};
template struct is_array<int const[2]>;
--------------------------------------------
$ g++-3.4 -c is_array.cc
is_array.cc:10: error: size of array is not an integral constant-expression
is_array.cc:10: error: size of array is not an integral constant-expression
The problem seems that, at unification time, the domain of the array type is a
(NON_LVALUE_EXPR (NOP_EXPR (INTEGER_CST))), and the substitution code doesn't
seem to handle it. No clue about why.
--
Summary: [3.3?/3.4/3.5 Regression]
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: giovannibajo at libero dot it
CC: gcc-bugs at gcc dot gnu dot org,john at johnmaddock dot
co dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13997