[Bug java/21540] switch stmt problem

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Thu May 19 15:27:00 GMT 2005


------- Additional Comments From falk at debian dot org  2005-05-19 15:27 -------
(In reply to comment #3)
> gcc has this problem as well. Although, it will let you have an expression using
> only constants like
> 
> case 'A' + ('B'<<8):
> 
> but not
> 
> case *((uint16_t *)"AB"):

Since C requires case labels to be integer constant expressions, and this
isn't one, there's no problem here.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21540



More information about the Gcc-bugs mailing list