This is the mail archive of the gcc-bugs@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]

[Bug java/21540] switch stmt problem


------- 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


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