This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpplib: Update IStable, better error recovery


On Sat, Jul 08, 2000 at 07:21:12PM +0900, Neil Booth wrote:
> This patch comes from adding a new file to the testsuite testing basic
> things about directives in general.
> 
> I discovered error recovery was poor - it was easy to get cpp confused
> about the nesting level of #if's if there was a problem in a #if.
> Also, an unterminated function-like macro invocation that ran into a
> directive would not process that directive.  I think that's untidy
> (e.g. it can lead to #if nesting problems and confusion), so now it
> issues an error like before, but goes on to process the directive.

This is probably OK, but I'm a little confused about directives and
function-like macros.  It appears that you have

macro(a, b,
#directive
)

treated as an unterminated use of 'macro()' followed by a directive
and a stray close paren.  Is that correct?

> The testsuite below tests such error recovery, and that pedantically
> the only whitespace in directive lines is ' ' or '\t'.  Getting this
> right involved updating the table IStable, which was on the to-do list
> anyway.

The IStable changes are definitely OK.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]