INF: C 5.1/6.x Do Not Implement Multibyte Character Constants

ID Number: Q38328

5.10 6.00 6.00a 6.00ax | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

Page 28 of the ANSI C draft proposal X3J11/88-001 describes an integer

character constant as being a sequence of one or more multibyte

characters enclosed in single quotation marks (for example, 'a' or

'ab').

Page 21 of the "Microsoft C 5.1 Optimizing Compiler Language Reference

Guide" states that an integer character constant is formed by

enclosing a single character from the representable character set

within single quotation marks. It makes no reference to multibyte

character constants (for example, 'ab'). If a source file has the

character constant defined as follows, the following error is

generated

C2015: Too many chars in constant

for the following line:

int ch = 'ab';

This error is correct, because Microsoft C versions 5.1, 6.0, 6.0a,

and 6.0ax do not implement multi-character integer character

constants. Note that page 29 of the draft standard says that such

constructions are "implementation-defined."

Additional reference words: 5.00 5.10 6.00 6.00a 6.00ax