bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stl_uninitialized.h:61: Internal compiler error


From: Tom Huggins
Subject: stl_uninitialized.h:61: Internal compiler error
Date: Mon, 4 Dec 2000 09:48:28 -0700

When attempting to compile using the following line I received the following
error

>g++ -c -O -fguiding-decls -I/export/home/tomh/newStl -o rule.o rule.cpp
/export/home/tomh/newStl/stl_uninitialized.h: In function `class SValue *
__uninitialized_copy_aux<SValue *, SValue *>(class SValue *, class SValue *,
class SValue *, struct __false_type)':
/export/home/tomh/newStl/stl_uninitialized.h:61: Internal compiler error.
/export/home/tomh/newStl/stl_uninitialized.h:61: Please submit a full bug
report to address@hidden'.

I am including the files that have the definition for SValue. The only
nontrivial part of this class is that it has a union. The error occurs in
the score function that follows:
Note: When I comment out the calls to push_back the error go away.


typedef vector<SValue> valstack;
bool SRule::score(SConcept* pConcept, bool bCase)
{
  // Return true if empty stack
  if (msJoinType == J_INVALID)
    return false;
  if (mElements.size() == 0)
    return true;

  // Process stack
  valstack  mystack;

  for (int i = 0; i < mElements.size(); i++)
  {
    SObject* pElement = mElements[i];
    if (pElement->getId() == OPERATOR_ID)
    {

      SValue second = mystack.back();
      mystack.pop_back();
      SValue first = mystack.back();
//////////////////////////////////////////
      mystack.pop_back(); // this is one of the lines that causes an error
////////////////////////////////////////

      SValue result;
      SOperator* pOperator = (SOperator*)pElement;
      if (!pOperator->compare(&first, &second, &result, bCase))
        if (msJoinType != J_ALL_OR)
          return false;
      if (result.mlVal == 1 && msJoinType == J_ALL_OR)
        return true;
      else if (result.mlVal == 0 && msJoinType == J_ALL_AND)
        return false;
////////////////////////////////////////////
      mystack.push_back(result);  // this is the next problem line
/////////////////////////////////////////
    }
    else
    {
      SValue value;
      if (pElement->getId() == VALUE_ID)
        ((SObjectValue*)(pElement))->getValue(&value);
      else if (pElement->getId() == SCORE_ID)
        ((SObjectScore*)(pElement))->getValue(pConcept, &value);
      else if (pElement->getId() == OBJECT_KEY_ID)
        ((SObjectKey*)(pElement))->getValue(pConcept, &value, bCase);
      else
        value.mlVal = ((SRule*)(pElement))->getValue(pConcept, bCase);
/////////////////////////////////////////////////////
      mystack.push_back(value); // this is the last line that causes the
error
/////////////////////////////////////////////////
    }

  }

  // Return result
  if (mystack.size() == 1)
  {
    SValue final = mystack.back();
    return (final.mlVal == 1);
  }
  return false;

}

 <<value.cpp>>  <<value.h>> 

Tom Huggins
SunGard Expert Solutions
address@hidden
(801)955-3245

Attachment: value.cpp
Description: Binary data

Attachment: value.h
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]