[Bug c++/67594] New: Bug on partial specialization? Incomplete type.

vincent.lextrait at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 15 22:00:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67594

            Bug ID: 67594
           Summary: Bug on partial specialization? Incomplete type.
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

# 1 "foo.cpp"

# 1 "<built-in>"

# 1 "<command-line>"

# 1 "foo.cpp"

template <typename B, int I=1> class C{};

template <int I> class C<float,I>{};

template <> class C<float>: public C<float,1>{};

C<float> c;

When compiled with:

/usr/local/bin/gcc-4.9 -c foo.cpp

Issues:

foo.cpp:3:36: error: invalid use of incomplete type 'class C<float>'
 template <> class C<float>: public C<float,1>{};
                                    ^
foo.cpp:3:19: error: declaration of 'class C<float>'
 template <> class C<float>: public C<float,1>{};
                   ^

I do not see anything incomplete there.
gcc version 4.9.2:

Using built-in specs.

COLLECT_GCC=/usr/local/bin/gcc-4.9

COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.2_1/libexec/gcc/x86_64-apple-darwin14.3.0/4.9.2/lto-wrapper

Target: x86_64-apple-darwin14.3.0

Configured with: ../configure --build=x86_64-apple-darwin14.3.0
--prefix=/usr/local/Cellar/gcc/4.9.2_1
--libdir=/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog
--with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes
--enable-stage1-checking --enable-checking=release --enable-lto
--with-build-config=bootstrap-debug --disable-werror
--with-pkgversion='Homebrew gcc 4.9.2_1'
--with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin
--disable-nls --enable-multilib

Thread model: posix

gcc version 4.9.2 (Homebrew gcc 4.9.2_1)



More information about the Gcc-bugs mailing list