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] Fix overzealous folding


Eric Botcazou wrote:

The 2 things are clearly not compatible, so one of them needs to be disabled.
Since the folding is already disabled for BOOLEAN_TYPE, I think it makes sense to disable it for ENUMERAL_TYPE too. If you think it's better to disable the VRP semantics, then let's disable it.

In C/C++, ENUMERAL_TYPEs and INTEGER_TYPEs are very closely related. I'd be pretty surprised if I writing my code with int-sized enums instead of ints caused different behavior. So, I don't think the patch as written makes sense. But, I haven't understood the whole problem well enough to say anything sensible about where a better fix might lie.


Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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