This is the mail archive of the gcc-patches@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: [PATCH] improve C++ code by changing fold-const.c


On Wed, 2004-05-26 at 18:40, Andrew Pinski wrote:
> And here is C testcase which fails because the cast to "const int*" is 
> not removed:
> int f()
> {
>    int i;
>    int *ir = &i;
>    const int *ip = &i;
>    *ir = 1;
>    return *ip;
> }
This will also be collapsed down to a "return 1" by the changes I
suggested in my previous message.

Jeff



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