Adding statement to an already defined function

2010-03-01 Thread Nikola Ikonic
Hello, I am working on modifying GCC and I would like to ask you one question. I am trying figure out a way to add an external statement to already generated function. Is that possible? For example, let's say that if I want to check is function with name "DoSomething" already generated/parsed (b

Possible bug in GCC front end

2010-02-08 Thread Nikola Ikonic
Hello all, I have noticed something that is creating problems in my modified GCC, and I see it as a bug, maybe I don't do something right. If you take a look at cpp_interpret_string() function in charset.c you will see the following part: for (;;) { base = p; while (p

_cpp_line_note structure in front end

2010-02-05 Thread Nikola Ikonic
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 .

GCC calling GNU assembler

2010-02-03 Thread Nikola Ikonic
Hello all, Could anybody please answer me on following question: where is GCC callin assembler where it recognizes assembler code in C function? For example, let's say that there is this line in C code: asm("mov r1,r0"); So, the parser parses this as an assembler string. But where, in GCC code,

C parser modification & questions

2010-01-19 Thread Nikola Ikonic
Hello, I am working on a modification of C parser and I need some help since I am having difficulties understanding some issues (I am complete newbie on GCC). Long story short, I am trying to add a new attribute to function types (similar to "inline", for example). Let's say that this new keyword