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++/60854] New: inline constructor of extern template


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

            Bug ID: 60854
           Summary: inline constructor of extern template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joachim.schoeberl at tuwien dot ac.at

Created attachment 32610
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32610&action=edit
source file

this code was accepted by gcc-4.8 up to (at least) gcc-4.9-20140323, but g++
(GCC) 4.9.0 20140411 (prerelease) complains.

compiled with
g++ -c -O2 --std=c++11 test.cpp



error message of gcc-4.9.0 prerelease:

test.cpp: In function âvoid Func()â:
test.cpp:5:46: error: inlining failed in call to always_inline
âMyClass<T>::MyClass() [with T = double]â: function body not available
   __attribute__ ((__always_inline__)) inline MyClass () { ; }
                                              ^
test.cpp:12:19: error: called from here
   MyClass<double> x;
                   ^

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