Ben Pfaff <[EMAIL PROTECTED]> writes: > I don't understand this rationale. C89 requires that the switch > expression be of integral type. For C89 compilers with the long > long int extension, a long long int is an integral type
No, because there's no standard for the "long long int" extension in C89. A conforming C89 compiler can support every feature of C99 long long int except for switch(). Such a compiler will still execute every C89 program correctly, so the implementation conforms to C89. For example, some conforming C89 systems have long long but use %Ld rather than %lld for printf formats; that also conforms to C89 (but not C99, obviously). > Are there actual implementations that support long long int but > not its use as a switch expression? Yes, apparently the HP-UX compiler in question is like this.