This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Update IStable, better error recovery
- To: Neil Booth <NeilB at earthling dot net>
- Subject: Re: cpplib: Update IStable, better error recovery
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Sat, 8 Jul 2000 10:43:11 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <E13ArjU-0003Rk-00@monkey.rosenet.ne.jp>
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