[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: Bug report
From: Alexey Zverovich <Alexey.Zverovich () brunel ! ac ! uk>
Date: 1999-12-10 17:21:19
[Download RAW message or body]
Problem summary:
G++ displays 'Internal compiler error' message when trying to
compile code that contains typedef for an array of negative
size within a class template. Within a non-templated class it
correctly diagnoses negative array size.
See below for minimal code needed to reproduce the problem.
I've come across this when implementing some compile-time
assertions for template arguments.
Cheers,
Alex.
----------------------------------------------------------------------
# g++ --version
egcs-2.91.66
----------------------------------------------------------------------
# uname -a
Linux [hostname] 2.2.5-15 #1 Mon Apr 19 23:00:46 EDT 1999 i686 unknown
----------------------------------------------------------------------
Distribution: RedHat 6.0
----------------------------------------------------------------------
Command line: g++ bug.cxx
----------------------------------------------------------------------
Source code:
// bug.cxx
template<int N>
class bug
{
typedef char fail[-1];
};
----------------------------------------------------------------------
Preprocessed output:
# 1 "bug.cxx"
template<int N>
class bug
typedef char fail[-1];
};
----------------------------------------------------------------------
Compiler output:
bug.cxx:5: Internal compiler error.
bug.cxx:5: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
bug.cxx:5: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic