pro64-contrib
[Top] [All Lists]

Parse error handling error

To: pro64-contrib@xxxxxxxxxxx
Subject: Parse error handling error
From: Sterling Augustine <Sterling@xxxxxxxxxxxxx>
Date: Thu, 01 Mar 2001 15:15:46 -0800
Sender: owner-pro64-contrib@xxxxxxxxxxx
The simple test case below reveals an incorrect error.

>>>>>>>>>

void foo(void)
{
   /*no trailing brace!*/

<<<<<<

$ sgicc brace.c
brace.c: In function `foo':
brace.c:4: parse error at end of input
### Compiler Error during Writing WHIRL file phase:
### Can't write PU headers section in intermediate compiler file
/tmp/ccB.e901qW

The error does not occur in sgiCC.

The problem occurs because WFE_Start_Function is called early in the
parse, before you know if you have a valid PU. (gfecc has a
substantially different rtl to whirl approach for functions which avoids
the problem).  The front end later chokes when it tries to write info
out for an incomplete PU.

Sterling


<Prev in Thread] Current Thread [Next in Thread>