Hello all, Could anybody please answer me on one question which is related to _cpp_line_note structure (GCC front end)?
I am currently working on modifying FE to "swallow" piece of code similar to this one: _Asm void DoSomething(some_parameters) { mov r1, r2 mov r2, r3 ... and similar assembler code } The idea is to just take assembler body and parse it as there was asm("") statement. I've managed to lex/parse whole this. However, when FE lexes assembler body of this function, my code fails starting from here: skipped_white: if (buffer->cur >= buffer->notes[buffer->cur_note].pos && !pfile->overlaid_buffer) { _cpp_process_line_notes (pfile, false); result->src_loc = pfile->line_table->highest_line; } It goes into _cpp_process_line_notes and then into abort() Above quoted code is located in _cpp_lex_direct() in lex.c file. In short, (buffer->cur>= buffer->notes[buffer->cur_note].pos) is true. I understand that I need to reposition pos field of _cpp_line_note structure, but I don't know where to position it. At the end of assembler body? At the closing parenthesis of DoSomething() function? Where should it go? What is the purpose of _cpp_line_note structure and this field at all? Any suggestion/help/advice would be much appreciated. Thanks in advance! Best regards, Nikola