This is the mail archive of the gcc-help@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]

Re : Re : Re : Re : [GENERIC] problem when adding 2 VAR_DEC in the main function





----- Message d'origine ----
De : charfi asma <charfiasma@yahoo.fr>
À : Ian Lance Taylor <iant@google.com>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Lun 25 octobre 2010, 10h 26min 04s
Objet : Re : Re : Re : [GENERIC] problem when adding 2 VAR_DEC in the main 
function





----- Message d'origine ----
De : Ian Lance Taylor <iant@google.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Sam 23 octobre 2010, 1h 44min 39s
Objet : Re: Re : Re : [GENERIC] problem when adding 2 VAR_DEC in the main 
function

charfi asma <charfiasma@yahoo.fr> writes:

> my problem is that the method is never added to the TYPE_METHOD list of the 
> RECROD_TYPE:

The middle-end doesn't support type methods.  The TYPE_METHODS field
probably shouldn't really be in the middle-end at all; it's only used
for generating debug info.  Any work you do with TYPE_METHODS is
entirely up to your frontend.

Ian

Hello,

Thank you Ian for this clarification, but how can I add a class' method to the 
generic tree?
should I add it to the TYPE_FIELDS just like attribute ?

thank you very much.

Asma

Hello,
I look at the cp and java front end and they actually use TYPE_MEHODS to add 
method to one class.
both implement add_method function that contains:  

DECL_CHAIN (fndecl) = TYPE_METHODS (this_class);
TYPE_METHODS (this_class) = fndecl;

so the middle-end  take this Generic representation of a method and gimplify it.

so why it does not work in my case ?

thanks

Asma




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]