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: a question for the c/c++ front end / standards people.


On Mon, Nov 5, 2012 at 10:02 AM, Kenneth Zadeck
<zadeck@naturalbridge.com> wrote:
>
> The question is why is having a case label of 256 on a unsigned char switch
> legal?

Are you asking why it is valid in the C language?  Or are you asking
why it is valid in GIMPLE?  I guess the first question is fairly
obvious so you are asking about GIMPLE.  I don't personally see a
problem with declaring that it is invalid in GIMPLE, but of course you
would need to modify the gimplifier and verify_gimple_stmt to reject
this code.

Ian


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