Description of problem: I get the following error when trying to compile gdl-0.9pre2 for FE6: datatypes.cpp: At global scope: datatypes.cpp:534: error: specialization of 'Data_< <template-parameter-1-1> >::Data_(const dimension&, BaseGDL::InitType) [with Sp = SpDPtr]' after instantiation datatypes.cpp:534: error: invalid function declaration datatypes.cpp:543: error: specialization of 'Data_< <template-parameter-1-1> >::Data_(const dimension&, BaseGDL::InitType) [with Sp = SpDObj]' after instantiation datatypes.cpp:543: error: invalid function declaration I did not get this error when I compiled for FE development on Jul 3 2006 (so 4.1.1-6?). Now, I don't know if this is a gcc regression or bad C++ code in gdl that is finally getting flagged properly. Version-Release number of selected component (if applicable): cc-4.1.1-20 Code snippet: template<> Data_<SpDString>::Data_(const dimension& dim_, BaseGDL::InitType iT): SpDString(dim_), dd(dim.N_Elements()) { dim.Purge(); if( iT == BaseGDL::INDGEN) throw GDLException("DStringGDL(dim,InitType=INDGEN) called."); } template<> Data_<SpDPtr>::Data_(const dimension& dim_, BaseGDL::InitType iT): SpDPtr(dim_), dd(dim.N_Elements()) { dim.Purge(); if( iT == BaseGDL::INDGEN) throw GDLException("DPtrGDL(dim,InitType=INDGEN) called."); } template<> Data_<SpDObj>::Data_(const dimension& dim_, BaseGDL::InitType iT): SpDObj(dim_), dd(dim.N_Elements()) { dim.Purge(); if( iT == BaseGDL::INDGEN) throw GDLException("DObjGDL(dim,InitType=INDGEN) called."); } The errors are flagged only for the second two specializations.
Created attachment 136590 [details] Pre-processed source file
gdl is buggy, see http://gcc.gnu.org/PR28058 for details.