[C PATCH] Fix asm parsing error recovery (PR c/37772)
Joseph S. Myers
joseph@codesourcery.com
Wed Apr 1 12:54:00 GMT 2009
On Wed, 1 Apr 2009, Jakub Jelinek wrote:
> Hi!
>
> When asm ( isn't followed by a string literal (nor a wide string),
> the C parser crashes when trying to build_asm_expr with NULL str. The C++
> FE handles this gracefully.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux, ok for trunk/4.4?
>
> 2009-04-01 Jakub Jelinek <jakub@redhat.com>
>
> PR c/37772
> * c-parser.c (c_parser_asm_statement): Skip until close paren and
> return if c_parser_asm_string_literal returned NULL.
>
> * gcc.dg/pr37772.c: New test.
OK (I can't approve the C++ testcase).
> * g++.dg/ext/asm11.C: New test.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list