help with front end and scopes

2017-04-12 Thread Andre Groenewald
I am a bit stuck on global, file and local name spaces and scopes. Normally my expression bindings is associated with a function, which makes the function the scope of all the variables. my front end can parse something like this: int testfunc(int parmVar) { int testfuncVar; } int testfunc2(i

Re: help with front end and scopes

2017-04-12 Thread Richard Biener
On April 12, 2017 10:24:31 AM GMT+02:00, Andre Groenewald wrote: >I am a bit stuck on global, file and local name spaces and scopes. > >Normally my expression bindings is associated with a function, which >makes the function the scope of all the variables. > >my front end can parse something like

if

2017-04-12 Thread ajoy chao

Re: help with front end and scopes

2017-04-12 Thread Andre Groenewald
Thanks for the help. I just want to elaborate just a bit. So if I understand it correctly, only the function in my case are gimplified or the starting point. Lets say I initialised classVariable 10 outside a function. tree setVariable = build2(INIT_EXPR, void_type_node, classVariableDecl, build_i

Re: help with front end and scopes

2017-04-12 Thread Richard Biener
On Wed, Apr 12, 2017 at 2:07 PM, Andre Groenewald wrote: > Thanks for the help. I just want to elaborate just a bit. > > So if I understand it correctly, only the function in my case are > gimplified or the starting point. > > Lets say I initialised classVariable 10 outside a function. > tree setV

Re: help with front end and scopes

2017-04-12 Thread Andre Groenewald
This info is gold. I have much clearer understanding now. Thanks, André On Wed, Apr 12, 2017 at 2:45 PM, Richard Biener wrote: > On Wed, Apr 12, 2017 at 2:07 PM, Andre Groenewald > wrote: >> Thanks for the help. I just want to elaborate just a bit. >> >> So if I understand it correctly, only th