This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15427] New: [3.4 regression] valid code results in incomplete type error


The following code:

template<class T>
struct A
{
    T foo;
};

template<class T>
struct B
{
    A<int> _squares[2];
};

results in:

>/dept/rnd/vendor/gcc-3.4.0/bin/g++ -c testCornerFinder.C
testCornerFinder.C:10: error: field `_squares' has incomplete type

with gcc-3.4.  gcc-3.3 compiles this code correctly.  The code
also compiles if the [2] is removed.

-nick

-- 
           Summary: [3.4 regression] valid code results in incomplete type
                    error
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nick at ilm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]