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] |
Hi Nathan, On 7/22/07, Nathan Sidwell <nathan@codesourcery.com> wrote: > Why not just have cp_parser_asm_operand_list return error_mark_node in the face > of any bogus operand? (with suitable operand eating in that case)? The attached patch implements this suggestion by modifying cp_parser_asm_operand_list to track whether any of the operands are invalid and to return error_mark_node in that case, adjusting the checks in cp_parser_asm_definition accordingly. Bootstrapped and regression tested with no new failures on i686-pc-linux-gnu. Ok to apply? Cheers, Lee. cp/ PR c++/30849 PR c++/30850 PR c++/30851 * parser.c (cp_parser_asm_definition): Detect and discard asm statements with invalid inputs or outputs. (cp_parser_asm_operand_list): Return error mark node if any of the operands are invalid. Adjust documentation to reflect new potential return value. testsuite/ PR c++/30849 * g++.dg/parse/asm1.C: New test. PR c++/30850 * g++.dg/parse/asm2.C: Likewise. PR c++/30851 * g++.dg/parse/asm3.C: Likewise.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |