Re: Plugin API Comments (was Re: GCC Plug-in Framework ready to port)

2009-02-04 Thread Brendon Costa
2009/2/1 Sean Callanan : > > (3) The -fplugin-arg argument is one way to do arguments. We do it as > > -ftree-plugin=/path/to/plugin.so:arg=value:arg=value:... > In the previous discussions we had on this whole thing (http://gcc.gnu.org/ml/gcc/2008-09/msg00292.html), we were aiming towards argum

Re: Feedback request.

2008-12-07 Thread Brendon Costa
2008/12/8 Simon Hill <[EMAIL PROTECTED]>: > I'm curious as to why I didn't get any responses to my last posts here > on 29 / 11 / 2008. > http://gcc.gnu.org/ml/gcc/2008-11/ > Hi Simon, I have found in the past that larger posts do not get many if any responses. One thing that might help is to ask

Fwd: Functional Purity

2008-11-29 Thread Brendon Costa
Forgot to reply all... -- Forwarded message -- From: Brendon Costa <[EMAIL PROTECTED]> Date: 2008/11/30 Subject: Re: Functional Purity To: David Fang <[EMAIL PROTECTED]> >Sounds like you want to (at least): > > 1) automatically qualify every d

Functional Purity

2008-11-28 Thread Brendon Costa
Hi all, I want to use GCC to categorise "functional purity" in C++. My definition will differ from classic functional purity. In particular: A function is considered pure if it makes no changes to existing memory or program state. There may be a few exceptions to this rule such as for new/malloc i

Re: Defining a common plugin machinery

2008-10-09 Thread Brendon Costa
> Sounds like you're almost in need of a generic data marshalling interface > here. > Why do we need the complication of data marshaling? I don't see why we need to define that all plugin hooks have the same function interface as currently proposed. I.e. a single void*. This makes a lot of w

Re: Defining a common plugin machinery

2008-10-08 Thread Brendon Costa
> Personally I'm against the env var idea as it would make it harder to > figure out what's going on. I think someone mentioned that the same > effect could be achieved using spec files. > Ian mentioned the idea of creating small wrapper scripts with the names: gcc/g++ etc which just call the re

Re: Defining a common plugin machinery

2008-10-01 Thread Brendon Costa
> I believe we should first focus (when the runtime license will permit > that) on making whatever plugin machinery available and merged into > the trunk (when it comes back to stage one). This is not an easy task. Isn't the point of this discussion to decide what features to put into a plugin fra

Re: Defining a common plugin machinery

2008-10-01 Thread Brendon Costa
I have notes inline below, following is my summary of libplugin from what i understand of your posts: * It exists as a fraemwork that works with GCC now * It uses xml files to define plugins (Allows making new plugins as combinations of others without making a new shared library, i.e. just create a

Re: Adding to G++: Adding a warning on throwing unspecified exceptions.

2008-09-25 Thread Brendon Costa
> The above works on code::blocks, which uses some form of GCC, and > looks OK to me. > Of course this only works for exactly one exception type. > You'd have to wait for C++0X variadic templates (and hope you can > throw them) if you need zero or more than one. > It's also very verbose, a little

Re: Adding to G++: Adding a warning on throwing unspecified exceptions.

2008-09-24 Thread Brendon Costa
Simon Hill wrote: > Brendon Costa said: >> The author of the template class or container can't know >> what types of exceptions will be thrown from them, so you must define >> them as being able to throw all exceptions (which is how they are >> currently). > O

Re: Adding to G++: Adding a warning on throwing unspecified exceptions.

2008-09-24 Thread Brendon Costa
> I agree that it won't be very useful initially due to lots of third > party code like boost neither defining nor adhering exception > restrictions 100% of the time (STL may be guilty also). However, this > is a catch 22. Why not provide the mechanism for verifying exception > specifications so t

Re: (Side topic EDoc++ binary embedding)

2008-09-19 Thread Brendon Costa
> Sorry to nitpick, but there is nothing Mozilla-specific in > dehydra/treehydra. There are users outside of Mozilla. Sorry, i didn't realise this. > However, I do think it's awesome to be able to store plugin results in > the resulting binary to do LTO-style analyses. How well is that working >

Re: Defining a common plugin machinery

2008-09-19 Thread Brendon Costa
Basile STARYNKEVITCH wrote: > But what about the trunk, which uses tuples? I know nothing about the tuples and the trunk and whether tuples might affect the way plugins work. Maybe others can comment... To be honest i was more worried about how plugins will work with the garbage collector and pre-

Re: Defining a common plugin machinery

2008-09-18 Thread Brendon Costa
Ian Lance Taylor wrote: > Write a one-line shell script to use as your compiler (that's what I > would do), or define an environment variable which tells gcc which > plugins to load (e.g., GCC_PLUGINS=/a/file:/another/file). > > Thanks for the input. The one-liner shell script is a very good op

Re: Defining a common plugin machinery

2008-09-18 Thread Brendon Costa
Joseph S. Myers wrote: > I think this is a bad idea on grounds of predictability. I can understand this view and was initially reluctant to suggest the auto-load feature for this same reason. However i can not see another solution that can be used instead of this to achieve simple usability for a

Re: Defining a common plugin machinery

2008-09-18 Thread Brendon Costa
Hi all, Firstly, do others think it would be helpful to summarise any of this information on a wiki page, or will these emails be fine? In this email I will give my opinion on the questions asked by Deigo and ask a few additional questions that may be relevant. -- Wha

GCC Plugins (again)

2008-09-04 Thread Brendon Costa
Hi all, Every now and then I poke my head into this list to see if there is any more progress on the GCC Plugin branch issue. In particular I don't want to give up on this feature as it will be enormously useful for my open source project EDoc++. In the past, we have had a lot of discussion about

Re: How to get fndecl on C++ CALL_EXPR?

2008-01-30 Thread Brendon Costa
Andrew Pinski wrote: On Jan 30, 2008 7:59 PM, H.J. Lu <[EMAIL PROTECTED]> wrote: I am trying to get fndecl on a C++ CALL_EXPR with get_callee_fndecl. But get_callee_fndecl returns NULL. What is the proper way to get fndecl on a C++ CALL_EXPR in the middle end? If it is returning NULL, then the

Re: Plugin Branch

2008-01-22 Thread Brendon Costa
Can we count on the fact that the SVN branch will be synced from time to time to the mainline ? synchronized ...from... the mainline... Yes. When you say it will be synchronized from time to time, is it possible to make it so that at least for each mainline GCC release we could produce a

Plugin Branch

2008-01-21 Thread Brendon Costa
Hi all, I have been away from the GCC mailing list for a while. I searched the archives but could not find a resolution to the issue of inclusion of plugins to GCC. Has it been decided if the GCC plugin branch will be added to GCC or not? I am not after a discussion on the merits/issues of d

Re: Progress on GCC plugins ?

2007-11-18 Thread Brendon Costa
Tom Tromey wrote: > Bernd> In my view, plugins will bitrot quickly as GCC's interface > Bernd> changes; and they won't even help with the learning curve - > Bernd> does anyone believe for a second you won't have to understand > Bernd> compiler internals to write a plugin? > > Plugins are about dep

Re: Progress on GCC plugins ?

2007-11-07 Thread Brendon Costa
Joe Buck wrote: > On Wed, Nov 07, 2007 at 09:20:21AM +0100, Emmanuel Fleury wrote: >> Is there any progress in the gcc-plugin project ? > > Non-technical holdups. RMS is worried that this will make it too easy > to integrate proprietary code directly with GCC. > > If proponents can come up with

Re: Progress on GCC plugins ?

2007-11-07 Thread Brendon Costa
David Edelsohn wrote: > If you want to have a legal discussion, please take this > conversation somewhere else. > > Thanks, David > Sorry. I just posted another email before i got this. Is there a suitable place to move this discussion besides private emails? Thanks, Brendon.

Re: Progress on GCC plugins ?

2007-11-07 Thread Brendon Costa
Robert Dewar wrote: > Brendon Costa wrote: > >> The patch against GCC is GPL, the main library that is capable of >> manipulating the data exported by the patched GCC is LGPL and could >> theoretically be under any license. > > Whose theory? You don't know tha

Re: Progress on GCC plugins ?

2007-11-07 Thread Brendon Costa
Robert Dewar wrote: > Brendon Costa wrote: >>>> The concern is the many forms of shim layers that possibly could >>>> be written more easily with a plug-in framework. >>> there is also a difference in these two scenarios: >>> >>> 1. a) Comp

Re: Progress on GCC plugins ?

2007-11-07 Thread Brendon Costa
>> The concern is the many forms of shim layers that possibly could >> be written more easily with a plug-in framework. > > there is also a difference in these two scenarios: > > 1. a) Company X writes a modification to GCC to generate special > intermediate stuff with format Y. > > b) Com

Re: GCC Plugin Branch

2007-09-05 Thread Brendon Costa
Ben Elliston wrote: >> Does anyone have a template/example autoconf project that is already >> setup with the needed gcc headers + build infrastructure to create a GCC >> plugin? > > The talk at the GCC Summit mentioned a handful of existing plug-ins and > Sean spoke about them all being autoconfi

GCC Plugin Branch

2007-09-01 Thread Brendon Costa
Hi all, I have just recently had time to checkout and build the GCC plugin branch. I am interested in building a simple plugin to give it a try. After reading through the patches it seems simple enough, I just need to create a shared library that defines the symbols: pre_translation_unit transfor

Re: GCC plugin - was: Official Inclusion of GCC Extension Modules (Or similar)

2007-08-26 Thread Brendon Costa
Ben Elliston wrote: > I'm not sure how GEM (another Stony Book University project) relates to > the talk given at this year's GCC Summit, but there was a talk about a > plug-in architecture for GCC to allow modules to operate on the GIMPLE > IR ("Extending GCC with Modular GIMPLE Optimisations" by

Official Inclusion of GCC Extension Modules (Or similar)

2007-08-25 Thread Brendon Costa
Hi all, I have a project that could benefit a lot from using something similar to GEM (http://www.ecsl.cs.sunysb.edu/gem/). I have not used GEM (As doing so is pointless currently and thus my email), but to summarise for others not familiar with it following is an except from their website: GEM i

Re: Inclusion in an official release of a new throw-like qualifier

2007-04-11 Thread Brendon Costa
Aaron W. LaFramboise wrote: > Jason Merrill wrote: >> Sergio Giro wrote: >>> I perceived that many people think that the throw qualifiers, as >>> described by the standard, are not useful >> >> Yes. But that's not a reason to add a slightly different non-standard >> feature that would require peop

Re: Inclusion in an official release of a new throw-like qualifier

2007-04-10 Thread Brendon Costa
I prefer the method Jason mentioned of including this functionality as a form of more strict checking of -Wexception-specs (Or maybe defining a new warning) as opposed to having an attribute that defines new semantics. In the end the two are practically identical. The semantics of the existing "OL

Re: Extension for a throw-like C++ qualifier

2007-04-04 Thread Brendon Costa
ly similar result. I might look into this at a later time. Brendon. Sergio Giro wrote: > On Apr 2, 2007, at 2:32 AM, Brendon Costa wrote: >> I have for a while been working on a tool that performs static >> analysis > I agree that Brendon's project is a very good ide

Re: Extension for a throw-like C++ qualifier

2007-04-02 Thread Brendon Costa
I have for a while been working on a tool that performs static analysis of exception propagation through C/C++ code. It is very close to complete (I estimate the first release within the month). Implementing static analysis of C++ exception propagation in g++ alone is not really possible well at l

Obtaining FUNCTION_DECL arglist as defined in source

2007-03-24 Thread Brendon Costa
Hi All, I am writing to find out if there is any method of obtaining or constructing a function parameter list string as it would have been defined in the source code? For example for the function: int Function(std::string v1, std::string v2) {return F(v1, v2);} I would like to obtain a string t

Re: Pre Compiled Headers

2007-02-13 Thread Brendon Costa
Mike Stump wrote: > On Feb 13, 2007, at 3:16 PM, Brendon Costa wrote: >> There is no "additional" pain in doing this as I have already >> developed my code using manual malloc/free in such a way that i am >> reasonably sure there are no leaks, or double free calls

Re: Pre Compiled Headers

2007-02-13 Thread Brendon Costa
Thanks for the response. >> * Is it possible to explicitly free garbage collected memory if i know i >> will not be needing it any more > > Yes, ggc_free.[1] > > 1 - Some people think that all the savings you'd get from this aren't > work the pain of doing it, if you have to track down any over

Re: Pre Compiled Headers

2007-02-13 Thread Brendon Costa
that the way i was going about it was going to fail. Mike Stump wrote: > On Feb 11, 2007, at 1:17 PM, Brendon Costa wrote: >> I am coding an extension for GCC and am having some difficulty with >> pre-compiled headers. I dont know if my understanding of how they work >> is comp

Pre Compiled Headers

2007-02-11 Thread Brendon Costa
Hi All, I am coding an extension for GCC and am having some difficulty with pre-compiled headers. I dont know if my understanding of how they work is completely correct and so my code is getting a segfault. I have a hook into gimplify_function_tree() and I process functions as they pass through t

Re: Understanding some EXPR nodes.

2006-12-07 Thread Brendon Costa
Thanks for the reply. One thing that I didnt quite get... Ian Lance Taylor wrote: TRY_CATCH_EXPR/TRY_FINALLY_EXPR If operand 0 throws an exception, there is an implicit rethrow after executing operand 1. (Of course, operand 1 can prevent that rethrow by doing its own throw, or by callin

Understanding some EXPR nodes.

2006-12-07 Thread Brendon Costa
Hi All, I am trying to understand certain EXPR nodes, when they are generated and how code generated from them behaves in the resulting program. The nodes that have me a little confused are: TRY_CATCH_EXPR TRY_FINALLY_EXPR MUST_NOT_THROW_EXPR EH_FILTER_EXPR Note: I have read the GCC Internals d

Re: Determining if a function has vague linkage

2006-12-02 Thread Brendon Costa
Brendon Costa wrote: > Hi all, > > I understand that all template functions in GCC should have vague > linkage and thus may be exported into numerous translation units where > they are used. I have been attempting to use a few different macros on > both an instanciated

Determining if a function has vague linkage

2006-12-01 Thread Brendon Costa
Hi all, I understand that all template functions in GCC should have vague linkage and thus may be exported into numerous translation units where they are used. I have been attempting to use a few different macros on both an instanciated template functions FUNCTION_DECL node and a normal functions

GCC Internals Documentation

2006-11-30 Thread Brendon Costa
I am getting a bit closer to finishing an alpha release of my project which makes use of a modified version of GCC 4.0.1 in order to collect data about the source code being compiled. In developing it i have come across a number of things that I think may be helpful to be added to the GCC Inter

Re: Multiple FUNCTION_DECLS for __cxa_begin_catch

2006-11-30 Thread Brendon Costa
Andrew Pinski wrote: On Thu, 2006-11-30 at 16:08 +1100, Brendon Costa wrote: Hi again, Is it safe to assume in the C++ front end that two functions declared in such a manner will always share the same implementation in which case it is kind-of like a "using" statement?

Multiple FUNCTION_DECLS for __cxa_begin_catch

2006-11-29 Thread Brendon Costa
Hi again, Getting further along with my project, I have come across yet another thing that I dont understand. While compiling: libstdc++-v3/libsupc++/vec.cc My GCC extension comes across two FUNCTION_DECL nodes that both have DECL_ASSEMBLER_NAME of __cxa_begin_catch After reading some past

Re: Differences in c and c++ anon typedefs

2006-11-27 Thread Brendon Costa
Andrew Pinski wrote: > Again C has different rules from C++. > In C, the following two TUs combined together are still valid code while in > C++, > they are invalid. > > tu1.c: > > struct a > { > int t; > }; > void f(struct a); > > cut - > tu2.c: > > type

Re: Differences in c and c++ anon typedefs

2006-11-27 Thread Brendon Costa
Gabriel Dos Reis wrote: > C++ defines a notion of "class name for linkage purpose" -- that is a > notion used to define the One Definition Rule. > In general the TYPE_NAME of TYPE_MAIN_VARIANT is the class name for > linkage purpose. > The behaviour you reported on implements the rule 7.1.3/5: >

Differences in c and c++ anon typedefs

2006-11-26 Thread Brendon Costa
Hi all, I have just come across a small difference in the way the C an C++ front ends handle anonymous struct types which is causing me some grief. In particular the following code: typedef struct { int b1; int b2; } Blah; void Function(Blah* b) {} When i get the Blah type in the func

Re: EXPR_HAS_LOCATION seems to always return false

2006-11-16 Thread Brendon Costa
Brendon Costa wrote: Hi all, I am trying to obtain location information (file, line) for a number of expr nodes (CALL_EXPR, THROW_EXPR and ADDR_EXPR) and it seems that every expression node i call EXPR_HAS_LOCATION on returns false. If it returns true i then use: EXPR_LINENO

Re: EXPR_HAS_LOCATION seems to always return false

2006-11-16 Thread Brendon Costa
Steven Bosscher wrote: On 11/17/06, Brendon Costa <[EMAIL PROTECTED]> wrote: Is there something i should be doing before using EXPR_HAS_LOCATION() ? Compile with -g, perhaps? I tried that and it didnt seem to make any difference.

EXPR_HAS_LOCATION seems to always return false

2006-11-16 Thread Brendon Costa
Hi all, I am trying to obtain location information (file, line) for a number of expr nodes (CALL_EXPR, THROW_EXPR and ADDR_EXPR) and it seems that every expression node i call EXPR_HAS_LOCATION on returns false. If it returns true i then use: EXPR_LINENO(), EXPR_FILENAME() to obtain the requ

Re: GCC Garbage Collection

2006-11-13 Thread Brendon Costa
Mike Stump wrote: It is the difference between all features of gcc working, or just most of the features working. If you want pch to work, you have to think about the issue and do up the appropriate code. However, I bet you don't need pch to work. If you are doing real stuff for a real

Re: GCC Garbage Collection

2006-11-13 Thread Brendon Costa
Mike Stump wrote: On Nov 12, 2006, at 10:47 PM, Brendon Costa wrote: I think i am having trouble with the garbage collector deleting the memory for tree nodes that i am still using. You must have a reference to that data from gc managed memory. If you don't use use gc to all

Re: GCC Garbage Collection

2006-11-13 Thread Brendon Costa
> The wiki page >http://gcc.gnu.org/wiki/Memory_management > might help you > > I had a quick glance at your mail, so I may be wrong, but I am not sure that > you configured correctly the build system so that thet GTY(()) macros get > processed correctly. Sadly, the gengtype generator does no

GCC Garbage Collection

2006-11-12 Thread Brendon Costa
Hi All, I think i am having trouble with the garbage collector deleting the memory for tree nodes that i am still using. In my code i gather all sorts of information from FUNCTION_DECL nodes as they pass through the gimplify_function_tree() function. I gather info about types and funct

Re: Getting "char" from INTEGER_TYPE node

2006-11-10 Thread Brendon Costa
> > I am having some trouble with getting type names as declared by the user > > in source. In particular if i have two functions: > > > > void Function(int i); > > void Function(char c); > > > > when processing the parameters i get an INTEGER_TYPE node in the > > parameter list for both function a

Getting "char" from INTEGER_TYPE node

2006-11-09 Thread Brendon Costa
I am having some trouble with getting type names as declared by the user in source. In particular if i have two functions: void Function(int i); void Function(char c); when processing the parameters i get an INTEGER_TYPE node in the parameter list for both function as expected, however IDENTI

Re: Obtaining type equivilance in C front end

2006-11-09 Thread Brendon Costa
The function you want is comptypes. Thanks. That is working well. Hi Brendon, Wouldn't the C++ one (mostly) be a superset of the C? Types are reasonably different between the C and C++ front ends though you do have the common ones because as you said, C++ is a superset of C. The C++

Obtaining type equivilance in C front end

2006-11-08 Thread Brendon Costa
How do i determine if two type nodes in the C front end are equivilent? In C++ i use same_type_p() but do not see an equivilant for the C front end. Thanks, Brendon.

Re: Obtaining builtin function list.

2006-11-08 Thread Brendon Costa
Thanks for the information. It was very helpful. I have now written some code (Seperate to gcc) that makes use of the builtins.def and associated def files to generate a list of all builtin functions as i require with the full prototypes as would be declared in say a header file. Are there als

Obtaining builtin function list.

2006-11-08 Thread Brendon Costa
How can I get a full list of all GCC C++ built-in functions that may be used on a given platform or GCC build? For example, __cxa_begin_catch(), __cxa_end_catch(), __builtin_memset ... I am currently working with GCC 4.0.1 source base. Thanks, Brendon.

Bug? Exceptions and implicit constructors.

2006-10-29 Thread Brendon Costa
Hi all, Is this a bug in GCC or does the code below incorrectly use exceptions and virtual inheritance? I expect the code below to display: Constructing child2. Caught exception: 3 However it causes an abort after displaying the first line. Looking further into this i found that when GCC creat

DECL_TEMPLATE_INFO and TYPE_DECL nodes

2006-10-28 Thread Brendon Costa
In what situations is it valid to call DECL_TEMPLATE_INFO() on a TYPE_DECL node? I am using DECL_TEMPLATE_INFO in order to see if a DECL node has any template information associated with it. The documentation says: For a VAR_DECL, FUNCTION_DECL, TYPE_DECL or TEMPLATE_DECL template-specific inform

Re: More __comp_ctor () woes

2006-10-25 Thread Brendon Costa
Hi all, Well after trying numerous different approaches to find the FUNCTION_DECL node for a constructor like MyClass::MyClass(int) from a FUNCTION_DECL node for one of the constructors: MyClass::__comp_ctor (int) or similar, I have found that there is a VERY simple way to do this using DECL_

Re: More __comp_ctor () woes

2006-10-25 Thread Brendon Costa
I have been looking at the source in class.c: clone_function_decl() clone_constructors_and_destructors() pt.c: check_explicit_specialization() In pt.c: check_explicit_specialization() it specifically requests that the clone function of a specialised constructor NOT add the new clone t

Re: More __comp_ctor () woes

2006-10-24 Thread Brendon Costa
For the code shown below, if i get the type node for the class: "MyClassT" and then call TYPE_METHODS() on it and iterate over the nodes, there is no FUNCTION_DECL node for the function: MyClassT::MyClassT<::int, ::char const*>(::char const*) From what I understand from the documentation, sinc

Re: More __comp_ctor () woes

2006-10-23 Thread Brendon Costa
In order to help, I am posting the code I use to try and get a "user constructor" FUNCTION_DECL node from a "__comp_ctor ()" FUNCTION_DECL node as mentioned in previous emails. The code can be found at the end of this email. Also... class MyClass { MyClass() {} }; int main() { MyCl

Re: More __comp_ctor () woes

2006-10-23 Thread Brendon Costa
Andrew Pinski wrote: Why do you need to find (2)? It is not the function which is actually called. DECL_SAVED_TREE might not be set but that is because it has already been gimplified and lowered to CFG at the time you are looking through the calls. Why do you need to know the constructor anyw

Re: More __comp_ctor () woes

2006-10-23 Thread Brendon Costa
Sorry that my previous email was unclear. I have tried to clarify what i meant in this email by answering your questions. Andrew Pinski wrote: On Tue, 2006-10-24 at 02:30 +, Brendon Costa wrote: I am trying to find the corresponding constructor from the basic_string class that should

More __comp_ctor () woes

2006-10-23 Thread Brendon Costa
Hi again, I am having issues with the __comp_ctor () __base_ctor () etc functions that I encounter in the C++ front-end tree (Just before gimplification). If i compile some code that looks like: #include int main() { std::allocator alloc; const char* str1 = "Hello"; const char* str2 =

Re: __comp_ctor and std::ofstream default constructor

2006-10-19 Thread Brendon Costa
Brendon Costa wrote: basic_ofstream::basic_ofstream(int __in_chrg, void* __vtt_parm) Can someone please help me understand why this happens? Well looking more in the source I have found that this happens when virtual inheritance is in play. It is used to determine which constructor will

__comp_ctor and std::ofstream default constructor

2006-10-19 Thread Brendon Costa
Hi all, I am having trouble with finding what method of a class that __comp_ctor () would call. I have been assuming that it will call the constructor method that has the same parameter list as the __comp_ctor () function but this does not seem to be working. Particulary when compiling code

Re: Getting a virtual functions VT lookup index

2006-10-18 Thread Brendon Costa
Brendon Costa wrote: > Hi all, > > How can I find a FUNCTION_DECL node from a CALL_EXPR node for virtual > function calls? > Well I have managed to achieve this, though I don't know if it is the best way to do so. For the sake of people that may find this question in the

Getting a virtual functions VT lookup index

2006-10-17 Thread Brendon Costa
Hi all, How can I find a FUNCTION_DECL node from a CALL_EXPR node for virtual function calls? Note: I am not after the node for the function that will be executed at runtime as I know this is not possible to determine in most situations. Thanks for any help in advance, Brendon. -

__comp_ctor() functions

2006-10-15 Thread Brendon Costa
Hi again, I have noticed in the C++ front end that classes have a few __comp_ctor () functions. These functions do not have an implementation that can be obtained with DECL_SAVED_TREE. Looking further into it there are a number of identifiers for functions like this added to cp_global_trees. I ha

Re: Additional tree node questions.

2006-10-15 Thread Brendon Costa
Brendon Costa wrote: > Ian Lance Taylor wrote: >> Brendon Costa <[EMAIL PROTECTED]> writes: >> >>> For each FUNCTION_DECL node I find, I want to determine what its >>> exception specification list is. I.e. the throws() statement in its >>> prot

Re: Additional tree node questions.

2006-10-14 Thread Brendon Costa
Ian Lance Taylor wrote: > Brendon Costa <[EMAIL PROTECTED]> writes: > >> For each FUNCTION_DECL node I find, I want to determine what its >> exception specification list is. I.e. the throws() statement in its >> prototype. > > Look at TYPE_RAISES_EXCEPTIONS

Re: building gcc

2006-10-14 Thread Brendon Costa
Bob Rossi wrote: > > Thanks Brendon, that was really helpful. I'm very new at this, and may > have some seemingly rather odd questions. I see that global_namespace is > of type 'union tree_node'. Is this the C++ language dependent AST? Yes, this is the C++ AST. I actually think it is just a supe

Re: Getting type used in THROW_EXPR

2006-10-14 Thread Brendon Costa
My GCC extension will never be merged with the GCC source I dont think but will be distributed as a patch for GCC. So with that in mind do you think there will be any functional issues for me to set the TREE_TYPE of all THROW_EXPR nodes to have the type of the exception they are throwing or void (a

Re: Getting type used in THROW_EXPR

2006-10-14 Thread Brendon Costa
Richard Guenther wrote: > On 10/14/06, Brendon Costa <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I have yet another question that has arisen as i have started testing my >> code. Basically I am trying to get the type that is being used in >> throwing an exce

Getting type used in THROW_EXPR

2006-10-14 Thread Brendon Costa
Hi all, I have yet another question that has arisen as i have started testing my code. Basically I am trying to get the type that is being used in throwing an exception. Is there a simple macro i can use to get the type of an exception from a THROW_EXPR? I think this is a matter of getting the T

Re: building gcc

2006-10-13 Thread Brendon Costa
Bob Rossi wrote: > Hi Ian, > > Basically, I want to use GCC with C,C++. I want to walk a tree that GCC > creates for the translation units. I would like to know if for these two > languages if I should use a language dependent tree, the generic tree or > the gimple tree. In general, I would like to

Additional tree node questions.

2006-10-12 Thread Brendon Costa
Sorry about the separate email. In addition to the previous questions I want to ask if there is a better way of achieving finding the type nodes for a functions exception specification list. For each FUNCTION_DECL node I find, I want to determine what its exception specification list is. I.e. the

Tree node questions

2006-10-12 Thread Brendon Costa
Hi all, If I have a FUNCTION_DECL node that returns non-null for DECL_TEMPLATE_INFO() then it is a template or template instantiation. How can I tell if it is a full instantiation (I.e. not general template or partial specialisation)? Does this also apply to nodes that represent template types (s

Re: Creating a VAR_DECL in a named section.

2006-10-06 Thread Brendon Costa
Brendon Costa wrote: > Hi all, > > I have been trying to place some data into a named section of a .o > file. I can do it currently by hooking into various of the RTL to > assembly routines and emitting the asm code directly, however I am now > trying to do it from within th

Creating a VAR_DECL in a named section.

2006-10-05 Thread Brendon Costa
Hi all, I have been trying to place some data into a named section of a .o file. I can do it currently by hooking into various of the RTL to assembly routines and emitting the asm code directly, however I am now trying to do it from within the C++ front end by inserting a VAR_DECL node and setting

Re: C++ Frontend and combining files

2006-10-03 Thread Brendon Costa
Thanks for all the help. I have tried a few things now and decided to try and create a new section called .edoc I tried using .comment on my machine, however there is already data in .comment on my machine and it will make parsing the data from the section to find my data a little more difficult as

Re: C++ Frontend and combining files

2006-10-03 Thread Brendon Costa
Brendon Costa wrote: > Mike Stump wrote: >> Hum, on second thought, why not just encode the information you want >> into the .o file. Just put it into a special section, in whatever >> format you like, the linker will combine them, no additional files, .a >> files work,

Re: C++ Frontend and combining files

2006-10-03 Thread Brendon Costa
Mike Stump wrote: > Hum, on second thought, why not just encode the information you want > into the .o file. Just put it into a special section, in whatever > format you like, the linker will combine them, no additional files, .a > files work, ld -r foo.o bar.o -o new.o works and so on. You can t

Re: C++ Frontend and combining files

2006-10-02 Thread Brendon Costa
Ian Lance Taylor wrote: > Brendon Costa <[EMAIL PROTECTED]> writes: > >> Then GCC (SOMEWHERE I CANT SEEM TO FIND THIS PART OF THE CODE) links >> these objects by calling ld with /tmp/foo1.o and /tmp/foo2.o combining >> these into: blah > > It&#x

C++ Frontend and combining files

2006-10-02 Thread Brendon Costa
t files to process for my .edc files and how to combine them. I am currently working with a gcc-4.0.1 source base. If someone can point me as to where GCC links these files together I would greatly appreciate it. Thanks, Brendon Costa.

G++ Modification Question

2005-08-03 Thread Brendon Costa
Hi all, A while ago I attempted to make a modification to gcc 4.0 before it was released. I attempted to create a modification that would allow me to document all exceptions that are eithre thrown directly by a function/method or that could propagate through a function/method. I ran into a

Getting access to g++ tree from front end.

2005-03-31 Thread Brendon Costa
Hi, I am trying to make a small modification to a local copy of gcc (In particular the g++ front end) that will help me in documenting exceptions that can be thrown by functions. I have had a look at most of the gcc documentation i could find and it has been helpful, but i am currently stuck in