This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a question for the c/c++ front end / standards people.
- From: Ian Lance Taylor <iant at google dot com>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 5 Nov 2012 10:08:41 -0800
- Subject: Re: a question for the c/c++ front end / standards people.
- References: <5097FF3A.9070308@naturalbridge.com>
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