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++/11993] New: gcc finds passing reference of template argument as template argument invalid


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: gcc finds passing reference of template argument as
                    template argument invalid
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefaandr at hotmail 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

this code doesn't compile anymore on 3.4, it does on 3.3.1 and before (but I
have no idea if this is a valid or invalid decision or 3.4)

Reading specs from /esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/specs
Configured with: ../../gcc/3.4/configure --program-suffix=-3.4
--enable-languages=c,c++ --prefix=/esat/quendi/gcc : (reconfigured)
Thread model: posix
gcc version 3.4 20030820 (experimental)
 /esat/quendi/gcc/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -E -quiet -v
-D_GNU_SOURCE /tmp/test5.cpp -mtune=pentiumpro -o test5.ii
ignoring nonexistent directory
"/esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4
 /esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/i686-pc-linux-gnu
 /esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/backward
 /usr/local/include
 /esat/quendi/gcc/include
 /esat/quendi/gcc/lib/gcc/i686-pc-linux-gnu/3.4/include
 /usr/include
End of search list.
 /esat/quendi/gcc/libexec/gcc/i686-pc-linux-gnu/3.4/cc1plus -fpreprocessed
test5.ii -quiet -dumpbase test5.cpp -mtune=pentiumpro -auxbase-strip
/tmp/test5.o -version -o test5.s
GNU C++ version 3.4 20030820 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.1.
GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48056
/tmp/test5.cpp:2: error: template argument 1 is invalid
/tmp/test5.cpp:2: error: expected `{'
/tmp/test5.cpp:2: error: expected init-declarator
/tmp/test5.cpp:2: error: expected `;'

test5.ii:
# 1 "/tmp/test5.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/tmp/test5.cpp"
template <int * a> class class2 {};
template <int & a> class class1 : public class2 <&a> {};


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