This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Catch unbalanced curly parentheses in read_braced_string()
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Mon, 23 Jun 2003 11:43:05 +0100
- Subject: Re: RFA: Catch unbalanced curly parentheses in read_braced_string()
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi Guys,
>
> Whilst editing a .md file I accidentally added one too many opening
> curly braces. This caused genconstants to go into an infinite loop
> because read_braced_string() never checks for end-of-file.
>
> The following patch fixes this problem and causes the program to
> issue an error message describing where the original opening curly
> braces was located.
>
> May I apply this patch please ?
>
> Cheers
> Nick
>
> 2003-06-23 Nick Clifton <nickc@redhat.com>
>
> * read-rtl.c (read_braced_string): Check for EOF. If
> encountered issue an error message.
>
Why not tack this on the end of the following if-else-if sequence (it's
the uncommon case, so should be at the end)?
Other than that, OK.
R.