-fdump-tree-gimple 옵션 (GCC 4.6.1)을 사용하여 C++을 컴파일 할 때 다음 함수가 포함 된 코드를 얻습니다 :gcc의 -fdump-tree-gimple에서/[ex] 연산자를 찾을 수 없습니다
std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int, _Alloc = std::allocator<int>] (struct _Vector_base * const this)
{
int * D.8482;
long int D.8483;
int * D.8484;
long int D.8485;
long int D.8486;
long int D.8487;
long unsigned int D.8488;
int * D.8489;
struct _Vector_impl * D.8490;
{
try
{
D.8482 = this->_M_impl._M_end_of_storage;
D.8483 = (long int) D.8482;
D.8484 = this->_M_impl._M_start;
D.8485 = (long int) D.8484;
D.8486 = D.8483 - D.8485;
D.8487 = D.8486 /[ex] 4;
D.8488 = (long unsigned int) D.8487;
D.8489 = this->_M_impl._M_start;
std::_Vector_base<int, std::allocator<int> >::_M_deallocate(this, D.8489, D.8488);
}
finally
{
D.8490 = &this->_M_impl;
std::_Vector_base<int, std::allocator<int>::_Vector_impl::~_Vector_impl (D.8490);
}
}
<D.8393>:
}
당신은 std::vector<int>
를 사용하는 간단한 프로그램을 만들어서이 코드를 얻을 수 있습니다. 어쨌든, 내가 이해할 수없는 코드 부분은 D.8487 = D.8486 /[ex] 4;
인 줄입니다. 의 소스 코드를 살펴 보았고 소멸자는 _M_deallocate
을 호출하는 하나의 라이너입니다. 누구든지 /[ex]
의 약자를 알고 있습니까? 지금까지 알아챈 유일한 점은 RHS 피연산자가 벡터가 매개 변수화하는 유형의 크기라는 것입니다.
답변을 게시하지 않으려 고합니다. 보조 문서가 없으므로 '/'와'[ex]'라고 생각합니다. 처음에는 나누기가되고 두 번째 토큰은 확장 연산자입니다. '4'는 분자와 같은 유형을 나타냅니다. – Necrolis