Bug 65879 - Segmentation fault in the absence of 'typename'
Segmentation fault in the absence of 'typename'
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-03 13:45 EDT by Rodrigo de Salvo Braz
Modified: 2007-04-18 12:42 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 15:46:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rodrigo de Salvo Braz 2002-06-03 13:45:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.18-3 i686)

Description of problem:
Segmentation fault in the absence of 'typename' while compiling simple C++
program.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Compile this shortened file (I used STLport for the inlcude<iterator> but I
don't think that matters:
#include <iterator>

using namespace std;

//-------------------------------------- pair_first_iterator
------------------------------------------
template<class Iterator>
class pair_first_iterator : public
iterator<iterator_traits<Iterator>::iterator_category,
                                            typename
iterator_traits<Iterator>::value_type::first_type,
                                            long,
                                            typename
iterator_traits<Iterator>::value_type::first_type*,
                                            typename
iterator_traits<Iterator>::value_type::first_type&>
{
 public:
  // typename // Uncommenting this avoids the segmentation fault
iterator_traits<Iterator>::value_type::first_type  operator*() const { return
(*iterator).first; }
 private:
  Iterator iterator;
};



Actual Results:  365 [rodrigo@bayes iterators]$ gcc it.cpp
it.cpp:15: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Expected Results:  A message error complaining about the absence of 'typename'

Additional info:
Comment 1 Alan Cox 2002-12-15 15:46:51 EST
3.2 correctly complains

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