This is the mail archive of the gcc@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: [GSoC] TYPE stringfied in call to add_operator


On April 25, 2014 4:54:28 PM CEST, Prathamesh Kulkarni <bilbotheelffriend@gmail.com> wrote:
>Hi,
>    I have a daft question to ask. I was looking through genmatch, I
>couldn't figure out why is tree code class (TYPE) stringified in call
>to add_operator () ?
>
>#define DEFTREECODE (SYM, STRING, TYPE, NARGS) \
>    add_operator (SYM, #SYM, #TYPE, NARGS)
>
>In add_operator()  tcc (argument corresponding to TYPE) is only used
>to check if the tree code belongs to one of (tcc_unary, tcc_binary,
>tcc_comparison, tcc_expression, tcc_reference) classes. Why can't we
>use enum tree_code_class for tcc ?

Because there is no .def file for Tcc so we'd have to errors prone duplicate the enum.

Richard.

>Thanks and Regards,
>Prathamesh



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