Bug 207044 - error: specialization after instantiation
Summary: error: specialization after instantiation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-18 22:39 UTC by Orion Poplawski
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-09-19 06:29:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Pre-processed source file (1.83 MB, application/octet-stream)
2006-09-18 22:39 UTC, Orion Poplawski
no flags Details

Description Orion Poplawski 2006-09-18 22:39:03 UTC
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.

Comment 1 Orion Poplawski 2006-09-18 22:39:04 UTC
Created attachment 136590 [details]
Pre-processed source file

Comment 2 Jakub Jelinek 2006-09-19 06:29:47 UTC
gdl is buggy, see http://gcc.gnu.org/PR28058 for details.



Note You need to log in before you can comment on or make changes to this bug.