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]

[RFC] is-a.h supporting casting from non const to const


Hi,
  While working on a patch to change some error to inform, I changed
the as_a cast in RTL_LOCATION to be as_a <const rtx_insn *>.  This
falls down when you start with a rtx rather than a const_rtx..

I had to modify is-a.h to this but I really don't like the
modification at all since it shows the bigger issues with templates.
Can anyone think of a better way of supporting this?  Attached is my
patch currently which is able to bootstrap with the modification to
RTL_LOCATION being there.

Thanks,
Andrew Pinski

Attachment: supportconstisa.diff.txt
Description: Text document


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