[cfe-dev] Patch: Add some semantic analysis to switch statements
Anders Carlsson
andersca at mac.com
Tue Jul 17 19:18:12 PDT 2007
17 jul 2007 kl. 19.14 skrev Neil Booth:
> Anders Carlsson wrote:-
>
>> Hello,
>>
>> here's a patch that makes sure that that the switch condition
>> expression has an integer type, and also that a switch doesn't have
>
> But that's not what the standard requires; it requires a scalar
> type. You can download a copy of the revised standard from the
> openstd website.
>
> Neil.
I'm reading that spec. It says:
6.8.4.2 The switch statement
Constraints
1 The controlling expression of a switch statement shall have integer
type.
Am I missing something?
Anders
More information about the cfe-dev
mailing list