Bug 56419

Summary: compiler reporting routines re-entered
Product: [Retired] Red Hat Linux Reporter: Mark V. Tollefson <tollefson>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-17 02:00:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark V. Tollefson 2001-11-17 02:00:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
got this error message
  Internal compiler error: Error reporting routines re-entered.
when trying to compile.
Details follow in steps to reproduce.


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


How reproducible:
Always

Steps to Reproduce:
1. downloaded sample source from the book The C++ Standard Library
from web site
www.josuttis.com/libbook/util/defalloc.hpp.html 

2. stored it in a file named defalloc.h

3. created this file named defalloc.cc
  #include "defalloc.h"
  int main() {
  }

4. ran this command:   CC -c defalloc.cc

5. got this output:
  In file included from defalloc.cc:1:
  defalloc.h:9: universal-character-name `\u
  Internal compiler error: Error reporting routines re-entered.
  Please submit a full bug report.
  See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

----------------------------------
here is the content of the .h file
----------------------------------
namespaceB stdB {
B B B templateB <classB T>
B B B classB allocatorB {
B B B B B public:
B B B B B B B //B typeB definitions
B B B B B B B typedefB size_tB B B B size_type;
B B B B B B B typedefB ptrdiff_tB difference_type;
B B B B B B B typedefB T*B B B B B B B B pointer;
B B B B B B B typedefB constB T*B B const_pointer;
B B B B B B B typedefB T&B B B B B B B B reference;
B B B B B B B typedefB constB T&B B const_reference;
B B B B B B B typedefB TB B B B B B B B B value_type;

B B B B B B B //B rebindB allocatorB toB typeB U
B B B B B B B templateB <classB U>
B B B B B B B structB rebindB {
B B B B B B B B B B B typedefB allocator<U>B other;
B B B B B B B };

B B B B B B B //B returnB addressB ofB values
B B B B B B B pointerB addressB (referenceB value)B constB {
B B B B B B B B B B B returnB &value;
B B B B B B B }
B B B B B B B const_pointerB addressB (const_referenceB value)B constB {
B B B B B B B B B B B returnB &value;
B B B B B B B }

B B B B B B B /*B constructorsB andB destructor
B B B B B B B B *B -
B nothingB toB doB becauseB theB allocatorB hasB noB state
B B B B B B B B */
B B B B B B B allocator()B throw()B {
B B B B B B B }
B B B B B B B allocator(constB allocator&)B throw()B {
B B B B B B B }
B B B B B B B templateB <classB U>
B B B B B B B B B allocatorB (constB allocator<U>&)B throw()B {
B B B B B B B }
B B B B B B B ~allocator()B throw()B {
B B B B B B B }

B B B B B B B //B returnB maximumB numberB ofB elementsB thatB canB beB all
ocated
B B B B B B B size_typeB max_sizeB ()B constB throw()B {
B B B B B B B B B B B returnB numeric_limits<size_t>::max()B /B sizeof(T);
B B B B B B B }

B B B B B B B //B allocateB butB don'tB initializeB numB elementsB ofB type
B T
B B B B B B B pointerB allocateB (size_typeB num,
B B B B B B B B B B B B B B B B B B B B B B B B B allocator<void>::const_po
interB hintB =B 0)B {
B B B B B B B B B B B //B allocateB memoryB withB globalB new
B B B B B B B B B B B returnB (pointer)(::operatorB new(num*sizeof(T)));
B B B B B B B }

B B B B B B B //B initializeB elementsB ofB allocatedB storageB pB withB va
lueB value
B B B B B B B voidB constructB (pointerB p,B constB T&B value)B {
B B B B B B B B B B B //B initializeB memoryB withB placementB new
B B B B B B B B B B B new((void*)p)T(value);
B B B B B B B }

B B B B B B B //B destroyB elementsB ofB initializedB storageB p
B B B B B B B voidB destroyB (pointerB p)B {
B B B B B B B B B B B //B destroyB objectsB byB callingB theirB destructor
B B B B B B B B B B B p->~T();
B B B B B B B }

B B B B B B B //B deallocateB storageB pB ofB deletedB elements
B B B B B B B voidB deallocateB (pointerB p,B size_typeB num)B {
B B B B B B B B B B B //B deallocateB memoryB withB globalB delete
B B B B B B B B B B B ::operatorB delete((void*)p);
B B B B B B B }
B B B };

B B B //B returnB thatB allB specializationsB ofB thisB allocatorB areB int
erchangeable
B B B templateB <classB T1,B classB T2>
B B B boolB operator==B (constB allocator<T1>&,
B B B B B B B B B B B B B B B B B B B B constB allocator<T2>&)B throw()B {
B B B B B B B returnB true;
B B B }
B B B templateB <classB T1,B classB T2>
B B B boolB operator!=B (constB allocator<T1>&,
B B B B B B B B B B B B B B B B B B B B constB allocator<T2>&)B throw()B {
B B B B B B B returnB false;
B B B }
}


Actual Results:  got error message


  In file included from defalloc.cc:1:
  defalloc.h:9: universal-character-name `\u
  Internal compiler error: Error reporting routines re-entered.
  Please submit a full bug report.
  See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.



Expected Results:  I expected a clean compile.


Additional info:

Comment 1 Jakub Jelinek 2001-11-21 13:12:00 UTC
The compiler bug got fixed some time ago (in gcc-2.96-86 and above).
The remaining thing is a bug in the source - you need to use real spaces
or tabs as whitespace, no some weird invisible characters.