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]
Other format: [Raw text]

Re: RFA: Catch unbalanced curly parentheses in read_braced_string()


> 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.



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