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

2014-11-23 Thread Trevor Saunders
On Sun, Nov 23, 2014 at 03:12:06PM -0800, Andrew Pinski wrote: > On Sun, Nov 23, 2014 at 12:51 PM, Trevor Saunders > wrote: > > On Sun, Nov 23, 2014 at 12:05:52PM -0800, Andrew Pinski wrote: > >> Hi, > >> While working on a patch to change some error to inform, I changed > >> the as_a cast in R

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

2014-11-23 Thread Andrew Pinski
On Sun, Nov 23, 2014 at 12:51 PM, Trevor Saunders wrote: > On Sun, Nov 23, 2014 at 12:05:52PM -0800, Andrew Pinski wrote: >> 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 . This >> falls down when you start with a rtx rathe

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

2014-11-23 Thread Trevor Saunders
On Sun, Nov 23, 2014 at 12:05:52PM -0800, Andrew Pinski wrote: > 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 . This > falls down when you start with a rtx rather than a const_rtx.. so, don't do that? if you have a const_rtx

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

2014-11-23 Thread Andrew Pinski
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 . 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 w